﻿jQuery.ui || (function (B) {
    B.ui = { version: "1.8.1",
        plugin: { add: function (H, I, A) {
            var G = B.ui[H].prototype;
            for (var J in A) {
                G.plugins[J] = G.plugins[J] || [];
                G.plugins[J].push([I, A[J]])
            } 
        },
        call: function (J, G, A) {
            var H = J.plugins[G];
            if (!H || !J.element[0].parentNode) { return }
            for (var I = 0; I < H.length; I++) { if (J.options[H[I][0]]) { H[I][1].apply(J.element, A) } } 
        } 
    },
contains:function(D,A){return document.compareDocumentPosition?D.compareDocumentPosition(A)&16:D!==A&&D.contains(A)},hasScroll:function(G,A){if(B(G).css("overflow")=="hidden"){return false}var H=(A&&A=="left")?"scrollLeft":"scrollTop",F=false;if(G[H]>0){return true}G[H]=1;F=(G[H]>0);G[H]=0;return F},isOverAxis:function(A,F,E){return(A>F)&&(A<(F+E))},isOver:function(A,J,I,L,K,H){return B.ui.isOverAxis(A,I,K)&&B.ui.isOverAxis(J,L,H)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};B.fn.extend({_focus:B.fn.focus,focus:function(D,A){return typeof D==="number"?this.each(function(){var C=this;setTimeout(function(){B(C).focus();(A&&A.call(C))},D)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var A;if((B.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){A=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(B.curCSS(this,"position",1))&&(/(auto|scroll)/).test(B.curCSS(this,"overflow",1)+B.curCSS(this,"overflow-y",1)+B.curCSS(this,"overflow-x",1))}).eq(0)}else{A=this.parents().filter(function(){return(/(auto|scroll)/).test(B.curCSS(this,"overflow",1)+B.curCSS(this,"overflow-y",1)+B.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!A.length?B(document):A},zIndex:function(H){if(H!==undefined){return this.css("zIndex",H)}if(this.length){var A=B(this[0]),G,F;while(A.length&&A[0]!==document){G=A.css("position");if(G=="absolute"||G=="relative"||G=="fixed"){F=parseInt(A.css("zIndex"));if(!isNaN(F)&&F!=0){return F}}A=A.parent()}}return 0}});B.extend(B.expr[":"],{data:function(A,E,F){return !!B.data(A,F[3])},focusable:function(F){var A=F.nodeName.toLowerCase(),E=B.attr(F,"tabindex");return(/input|select|textarea|button|object/.test(A)?!F.disabled:"a"==A||"area"==A?F.href||!isNaN(E):!isNaN(E))&&!B(F)["area"==A?"parents":"closest"](":hidden").length},tabbable:function(A){var D=B.attr(A,"tabindex");return(isNaN(D)||D>=0)&&B(A).is(":focusable")}})})(jQuery);(function(C){var D=C.fn.remove;C.fn.remove=function(A,B){return this.each(function(){if(!B){if(!A||C.filter(A,[this]).length){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")})}}return D.call(C(this),A,B)})};C.widget=function(I,B,A){var K=I.split(".")[0],J;I=I.split(".")[1];J=K+"-"+I;if(!A){A=B;B=C.Widget}C.expr[":"][J]=function(E){return !!C.data(E,I)};C[K]=C[K]||{};C[K][I]=function(E,F){if(arguments.length){this._createWidget(E,F)}};var L=new B();L.options=C.extend({},L.options);C[K][I].prototype=C.extend(true,L,{namespace:K,widgetName:I,widgetEventPrefix:C[K][I].prototype.widgetEventPrefix||I,widgetBaseClass:J},A);C.widget.bridge(I,C[K][I])};C.widget.bridge=function(A,B){C.fn[A]=function(I){var J=typeof I==="string",L=Array.prototype.slice.call(arguments,1),K=this;I=!J&&L.length?C.extend.apply(null,[true,I].concat(L)):I;if(J&&I.substring(0,1)==="_"){return K}if(J){this.each(function(){var F=C.data(this,A),E=F&&C.isFunction(F[I])?F[I].apply(F,L):F;if(E!==F&&E!==undefined){K=E;return false}})}else{this.each(function(){var E=C.data(this,A);if(E){if(I){E.option(I)}E._init()}else{C.data(this,A,new B(I,this))}})}return K}};C.Widget=function(B,A){if(arguments.length){this._createWidget(B,A)}};C.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(A,B){this.element=C(B).data(this.widgetName,this);this.options=C.extend(true,{},this.options,C.metadata&&C.metadata.get(B)[this.widgetName],A);var F=this;this.element.bind("remove."+this.widgetName,function(){F.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(H,A){var G=H,B=this;if(arguments.length===0){return C.extend({},B.options)}if(typeof H==="string"){if(A===undefined){return this.options[H]}G={};G[H]=A}C.each(G,function(F,E){B._setOption(F,E)});return B},_setOption:function(B,A){this.options[B]=A;if(B==="disabled"){this.widget()[A?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",A)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(L,A,B){var I=this.options[L];A=C.Event(A);A.type=(L===this.widgetEventPrefix?L:this.widgetEventPrefix+L).toLowerCase();B=B||{};if(A.originalEvent){for(var J=C.event.props.length,K;J;){K=C.event.props[--J];A[K]=A.originalEvent[K]}}this.element.trigger(A,B);return !(C.isFunction(I)&&I.call(this.element[0],A,B)===false||A.isDefaultPrevented())}}})(jQuery);(function(B){B.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var A=this;this.element.bind("mousedown."+this.widgetName,function(D){return A._mouseDown(D)}).bind("click."+this.widgetName,function(D){if(A._preventClickEvent){A._preventClickEvent=false;D.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(A){A.originalEvent=A.originalEvent||{};if(A.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(A));this._mouseDownEvent=A;var G=this,F=(A.which==1),H=(typeof this.options.cancel=="string"?B(A.target).parents().add(A.target).filter(this.options.cancel).length:false);if(!F||H||!this._mouseCapture(A)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){G.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(A)&&this._mouseDelayMet(A)){this._mouseStarted=(this._mouseStart(A)!==false);if(!this._mouseStarted){A.preventDefault();return true}}this._mouseMoveDelegate=function(C){return G._mouseMove(C)};this._mouseUpDelegate=function(C){return G._mouseUp(C)};B(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(B.browser.safari||A.preventDefault());A.originalEvent.mouseHandled=true;return true},_mouseMove:function(A){if(B.browser.msie&&!A.button){return this._mouseUp(A)}if(this._mouseStarted){this._mouseDrag(A);return A.preventDefault()}if(this._mouseDistanceMet(A)&&this._mouseDelayMet(A)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,A)!==false);(this._mouseStarted?this._mouseDrag(A):this._mouseUp(A))}return !this._mouseStarted},_mouseUp:function(A){B(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(A.target==this._mouseDownEvent.target);this._mouseStop(A)}return false},_mouseDistanceMet:function(A){return(Math.max(Math.abs(this._mouseDownEvent.pageX-A.pageX),Math.abs(this._mouseDownEvent.pageY-A.pageY))>=this.options.distance)},_mouseDelayMet:function(A){return this.mouseDelayMet},_mouseStart:function(A){},_mouseDrag:function(A){},_mouseStop:function(A){},_mouseCapture:function(A){return true}})})(jQuery);(function(I){I.ui=I.ui||{};var N=/left|center|right/,K="center",M=/top|center|bottom/,H="center",J=I.fn.position,L=I.fn.offset;I.fn.position=function(A){if(!A||!A.of){return J.apply(this,arguments)}A=I.extend({},A);var F=I(A.of),C=(A.collision||"flip").split(" "),B=A.offset?A.offset.split(" "):[0,0],E,D,G;if(A.of.nodeType===9){E=F.width();D=F.height();G={top:0,left:0}}else{if(A.of.scrollTo&&A.of.document){E=F.width();D=F.height();G={top:F.scrollTop(),left:F.scrollLeft()}}else{if(A.of.preventDefault){A.at="left top";E=D=0;G={top:A.of.pageY,left:A.of.pageX}}else{E=F.outerWidth();D=F.outerHeight();G=F.offset()}}}I.each(["my","at"],function(){var P=(A[this]||"").split(" ");if(P.length===1){P=N.test(P[0])?P.concat([H]):M.test(P[0])?[K].concat(P):[K,H]}P[0]=N.test(P[0])?P[0]:K;P[1]=M.test(P[1])?P[1]:H;A[this]=P});if(C.length===1){C[1]=C[0]}B[0]=parseInt(B[0],10)||0;if(B.length===1){B[1]=B[0]}B[1]=parseInt(B[1],10)||0;if(A.at[0]==="right"){G.left+=E}else{if(A.at[0]===K){G.left+=E/2}}if(A.at[1]==="bottom"){G.top+=D}else{if(A.at[1]===H){G.top+=D/2}}G.left+=B[0];G.top+=B[1];return this.each(function(){var V=I(this),U=V.outerWidth(),S=V.outerHeight(),T=I.extend({},G);if(A.my[0]==="right"){T.left-=U}else{if(A.my[0]===K){T.left-=U/2}}if(A.my[1]==="bottom"){T.top-=S}else{if(A.my[1]===H){T.top-=S/2}}T.left=parseInt(T.left);T.top=parseInt(T.top);I.each(["left","top"],function(P,O){if(I.ui.position[C[P]]){I.ui.position[C[P]][O](T,{targetWidth:E,targetHeight:D,elemWidth:U,elemHeight:S,offset:B,my:A.my,at:A.at})}});if(I.fn.bgiframe){V.bgiframe()}V.offset(I.extend(T,{using:A.using}))})};I.ui.position={fit:{left:function(C,A){var B=I(window),D=C.left+A.elemWidth-B.width()-B.scrollLeft();C.left=D>0?C.left-D:Math.max(0,C.left)},top:function(C,A){var B=I(window),D=C.top+A.elemHeight-B.height()-B.scrollTop();C.top=D>0?C.top-D:Math.max(0,C.top)}},flip:{left:function(F,E){if(E.at[0]==="center"){return}var C=I(window),A=F.left+E.elemWidth-C.width()-C.scrollLeft(),D=E.my[0]==="left"?-E.elemWidth:E.my[0]==="right"?E.elemWidth:0,B=-2*E.offset[0];F.left+=F.left<0?D+E.targetWidth+B:A>0?D-E.targetWidth+B:0},top:function(A,D){if(D.at[1]==="center"){return}var G=I(window),E=A.top+D.elemHeight-G.height()-G.scrollTop(),F=D.my[1]==="top"?-D.elemHeight:D.my[1]==="bottom"?D.elemHeight:0,C=D.at[1]==="top"?D.targetHeight:-D.targetHeight,B=-2*D.offset[1];A.top+=A.top<0?F+D.targetHeight+B:E>0?F+C+B:0}}};if(!I.offset.setOffset){I.offset.setOffset=function(G,C){if(/static/.test(I.curCSS(G,"position"))){G.style.position="relative"}var F=I(G),B=F.offset(),D=parseInt(I.curCSS(G,"top",true),10)||0,E=parseInt(I.curCSS(G,"left",true),10)||0,A={top:(C.top-B.top)+D,left:(C.left-B.left)+E};if("using" in C){C.using.call(G,A)}else{F.css(A)}};I.fn.offset=function(B){var A=this[0];if(!A||!A.ownerDocument){return null}if(B){return this.each(function(){I.offset.setOffset(this,B)})}return L.call(this)}}}(jQuery));(function(B){B.widget("ui.draggable",B.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this},_mouseCapture:function(D){var A=this.options;if(this.helper||A.disabled||B(D.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(D);if(!this.handle){return false}return true},_mouseStart:function(D){var A=this.options;this.helper=this._createHelper(D);this._cacheHelperProportions();if(B.ui.ddmanager){B.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};B.extend(this.offset,{click:{left:D.pageX-this.offset.left,top:D.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(D);this.originalPageX=D.pageX;this.originalPageY=D.pageY;(A.cursorAt&&this._adjustOffsetFromHelper(A.cursorAt));if(A.containment){this._setContainment()}if(this._trigger("start",D)===false){this._clear();return false}this._cacheHelperProportions();if(B.ui.ddmanager&&!A.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,D)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(D,true);return true},_mouseDrag:function(A,F){this.position=this._generatePosition(A);this.positionAbs=this._convertPositionTo("absolute");if(!F){var E=this._uiHash();if(this._trigger("drag",A,E)===false){this._mouseUp({});return false}this.position=E.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(B.ui.ddmanager){B.ui.ddmanager.drag(this,A)}return false},_mouseStop:function(A){var F=false;if(B.ui.ddmanager&&!this.options.dropBehaviour){F=B.ui.ddmanager.drop(this,A)}if(this.dropped){F=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode){return false}if((this.options.revert=="invalid"&&!F)||(this.options.revert=="valid"&&F)||this.options.revert===true||(B.isFunction(this.options.revert)&&this.options.revert.call(this.element,F))){var E=this;B(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(E._trigger("stop",A)!==false){E._clear()}})}else{if(this._trigger("stop",A)!==false){this._clear()}}return false},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(D){var A=!this.options.handle||!B(this.options.handle,this.element).length?true:false;B(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==D.target){A=true}});return A},_createHelper:function(F){var E=this.options;var A=B.isFunction(E.helper)?B(E.helper.apply(this.element[0],[F])):(E.helper=="clone"?this.element.clone():this.element);if(!A.parents("body").length){A.appendTo((E.appendTo=="parent"?this.element[0].parentNode:E.appendTo))}if(A[0]!=this.element[0]&&!(/(fixed|absolute)/).test(A.css("position"))){A.css("position","absolute")}return A},_adjustOffsetFromHelper:function(A){if(typeof A=="string"){A=A.split(" ")}if(B.isArray(A)){A={left:+A[0],top:+A[1]||0}}if("left" in A){this.offset.click.left=A.left+this.margins.left}if("right" in A){this.offset.click.left=this.helperProportions.width-A.right+this.margins.left}if("top" in A){this.offset.click.top=A.top+this.margins.top}if("bottom" in A){this.offset.click.top=this.helperProportions.height-A.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var A=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0])){A.left+=this.scrollParent.scrollLeft();A.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&B.browser.msie)){A={top:0,left:0}}return{top:A.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:A.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var A=this.element.position();return{top:A.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:A.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var H=this.options;if(H.containment=="parent"){H.containment=this.helper[0].parentNode}if(H.containment=="document"||H.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,B(H.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(B(H.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(H.containment)&&H.containment.constructor!=Array){var A=B(H.containment)[0];if(!A){return}var G=B(H.containment).offset();var F=(B(A).css("overflow")!="hidden");this.containment=[G.left+(parseInt(B(A).css("borderLeftWidth"),10)||0)+(parseInt(B(A).css("paddingLeft"),10)||0)-this.margins.left,G.top+(parseInt(B(A).css("borderTopWidth"),10)||0)+(parseInt(B(A).css("paddingTop"),10)||0)-this.margins.top,G.left+(F?Math.max(A.scrollWidth,A.offsetWidth):A.offsetWidth)-(parseInt(B(A).css("borderLeftWidth"),10)||0)-(parseInt(B(A).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,G.top+(F?Math.max(A.scrollHeight,A.offsetHeight):A.offsetHeight)-(parseInt(B(A).css("borderTopWidth"),10)||0)-(parseInt(B(A).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(H.containment.constructor==Array){this.containment=H.containment}}},_convertPositionTo:function(K,I){if(!I){I=this.position}var H=K=="absolute"?1:-1;var L=this.options,A=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,J=(/(html|body)/i).test(A[0].tagName);return{top:(I.top+this.offset.relative.top*H+this.offset.parent.top*H-(B.browser.safari&&B.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(J?0:A.scrollTop()))*H)),left:(I.left+this.offset.relative.left*H+this.offset.parent.left*H-(B.browser.safari&&B.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():J?0:A.scrollLeft())*H))}},_generatePosition:function(P){var A=this.options,J=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,K=(/(html|body)/i).test(J[0].tagName);var N=P.pageX;var M=P.pageY;if(this.originalPosition){if(this.containment){if(P.pageX-this.offset.click.left<this.containment[0]){N=this.containment[0]+this.offset.click.left}if(P.pageY-this.offset.click.top<this.containment[1]){M=this.containment[1]+this.offset.click.top}if(P.pageX-this.offset.click.left>this.containment[2]){N=this.containment[2]+this.offset.click.left}if(P.pageY-this.offset.click.top>this.containment[3]){M=this.containment[3]+this.offset.click.top}}if(A.grid){var L=this.originalPageY+Math.round((M-this.originalPageY)/A.grid[1])*A.grid[1];M=this.containment?(!(L-this.offset.click.top<this.containment[1]||L-this.offset.click.top>this.containment[3])?L:(!(L-this.offset.click.top<this.containment[1])?L-A.grid[1]:L+A.grid[1])):L;var O=this.originalPageX+Math.round((N-this.originalPageX)/A.grid[0])*A.grid[0];N=this.containment?(!(O-this.offset.click.left<this.containment[0]||O-this.offset.click.left>this.containment[2])?O:(!(O-this.offset.click.left<this.containment[0])?O-A.grid[0]:O+A.grid[0])):O}}return{top:(M-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(B.browser.safari&&B.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(K?0:J.scrollTop())))),left:(N-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(B.browser.safari&&B.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():K?0:J.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(E,A,F){F=F||this._uiHash();B.ui.plugin.call(this,E,[A,F]);if(E=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return B.Widget.prototype._trigger.call(this,E,A,F)},plugins:{},_uiHash:function(A){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});B.extend(B.ui.draggable,{version:"1.8.1"});B.ui.plugin.add("draggable","connectToSortable",{start:function(H,I){var G=B(this).data("draggable"),J=G.options,A=B.extend({},I,{item:G.element});G.sortables=[];B(J.connectToSortable).each(function(){var C=B.data(this,"sortable");if(C&&!C.options.disabled){G.sortables.push({instance:C,shouldRevert:C.options.revert});C._refreshItems();C._trigger("activate",H,A)}})},stop:function(A,G){var H=B(this).data("draggable"),F=B.extend({},G,{item:H.element});B.each(H.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;H.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(A);this.instance.options.helper=this.instance.options._helper;if(H.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",A,F)}})},drag:function(A,I){var H=B(this).data("draggable"),J=this;var G=function(C){var Q=this.offset.click.top,E=this.offset.click.left;var F=this.positionAbs.top,R=this.positionAbs.left;var D=C.height,P=C.width;var T=C.top,S=C.left;return B.ui.isOver(F+Q,R+E,T,S,D,P)};B.each(H.sortables,function(C){this.instance.positionAbs=H.positionAbs;this.instance.helperProportions=H.helperProportions;this.instance.offset.click=H.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=B(J).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return I.helper[0]};A.target=this.instance.currentItem[0];this.instance._mouseCapture(A,true);this.instance._mouseStart(A,true,true);this.instance.offset.click.top=H.offset.click.top;this.instance.offset.click.left=H.offset.click.left;this.instance.offset.parent.left-=H.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=H.offset.parent.top-this.instance.offset.parent.top;H._trigger("toSortable",A);H.dropped=this.instance.element;H.currentItem=H.element;this.instance.fromOutside=H}if(this.instance.currentItem){this.instance._mouseDrag(A)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",A,this.instance._uiHash(this.instance));this.instance._mouseStop(A,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}H._trigger("fromSortable",A);H.dropped=false}}})}});B.ui.plugin.add("draggable","cursor",{start:function(A,G){var F=B("body"),H=B(this).data("draggable").options;if(F.css("cursor")){H._cursor=F.css("cursor")}F.css("cursor",H.cursor)},stop:function(A,E){var F=B(this).data("draggable").options;if(F._cursor){B("body").css("cursor",F._cursor)}}});B.ui.plugin.add("draggable","iframeFix",{start:function(A,E){var F=B(this).data("draggable").options;B(F.iframeFix===true?"iframe":F.iframeFix).each(function(){B('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(B(this).offset()).appendTo("body")})},stop:function(D,A){B("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});B.ui.plugin.add("draggable","opacity",{start:function(A,G){var F=B(G.helper),H=B(this).data("draggable").options;if(F.css("opacity")){H._opacity=F.css("opacity")}F.css("opacity",H.opacity)},stop:function(A,E){var F=B(this).data("draggable").options;if(F._opacity){B(E.helper).css("opacity",F._opacity)}}});B.ui.plugin.add("draggable","scroll",{start:function(A,E){var F=B(this).data("draggable");if(F.scrollParent[0]!=document&&F.scrollParent[0].tagName!="HTML"){F.overflowOffset=F.scrollParent.offset()}},drag:function(A,I){var J=B(this).data("draggable"),G=J.options,H=false;if(J.scrollParent[0]!=document&&J.scrollParent[0].tagName!="HTML"){if(!G.axis||G.axis!="x"){if((J.overflowOffset.top+J.scrollParent[0].offsetHeight)-A.pageY<G.scrollSensitivity){J.scrollParent[0].scrollTop=H=J.scrollParent[0].scrollTop+G.scrollSpeed}else{if(A.pageY-J.overflowOffset.top<G.scrollSensitivity){J.scrollParent[0].scrollTop=H=J.scrollParent[0].scrollTop-G.scrollSpeed}}}if(!G.axis||G.axis!="y"){if((J.overflowOffset.left+J.scrollParent[0].offsetWidth)-A.pageX<G.scrollSensitivity){J.scrollParent[0].scrollLeft=H=J.scrollParent[0].scrollLeft+G.scrollSpeed}else{if(A.pageX-J.overflowOffset.left<G.scrollSensitivity){J.scrollParent[0].scrollLeft=H=J.scrollParent[0].scrollLeft-G.scrollSpeed}}}}else{if(!G.axis||G.axis!="x"){if(A.pageY-B(document).scrollTop()<G.scrollSensitivity){H=B(document).scrollTop(B(document).scrollTop()-G.scrollSpeed)}else{if(B(window).height()-(A.pageY-B(document).scrollTop())<G.scrollSensitivity){H=B(document).scrollTop(B(document).scrollTop()+G.scrollSpeed)}}}if(!G.axis||G.axis!="y"){if(A.pageX-B(document).scrollLeft()<G.scrollSensitivity){H=B(document).scrollLeft(B(document).scrollLeft()-G.scrollSpeed)}else{if(B(window).width()-(A.pageX-B(document).scrollLeft())<G.scrollSensitivity){H=B(document).scrollLeft(B(document).scrollLeft()+G.scrollSpeed)}}}}if(H!==false&&B.ui.ddmanager&&!G.dropBehaviour){B.ui.ddmanager.prepareOffsets(J,A)}}});B.ui.plugin.add("draggable","snap",{start:function(F,G){var H=B(this).data("draggable"),A=H.options;H.snapElements=[];B(A.snap.constructor!=String?(A.snap.items||":data(draggable)"):A.snap).each(function(){var D=B(this);var C=D.offset();if(this!=H.element[0]){H.snapElements.push({item:this,width:D.outerWidth(),height:D.outerHeight(),top:C.top,left:C.left})}})},drag:function(c,i){var Z=B(this).data("draggable"),b=Z.options;var f=b.snapTolerance;var V=i.offset.left,A=V+Z.helperProportions.width,W=i.offset.top,U=W+Z.helperProportions.height;for(var j=Z.snapElements.length-1;j>=0;j--){var Y=Z.snapElements[j].left,g=Y+Z.snapElements[j].width,l=Z.snapElements[j].top,e=l+Z.snapElements[j].height;if(!((Y-f<V&&V<g+f&&l-f<W&&W<e+f)||(Y-f<V&&V<g+f&&l-f<U&&U<e+f)||(Y-f<A&&A<g+f&&l-f<W&&W<e+f)||(Y-f<A&&A<g+f&&l-f<U&&U<e+f))){if(Z.snapElements[j].snapping){(Z.options.snap.release&&Z.options.snap.release.call(Z.element,c,B.extend(Z._uiHash(),{snapItem:Z.snapElements[j].item})))}Z.snapElements[j].snapping=false;continue}if(b.snapMode!="inner"){var k=Math.abs(l-U)<=f;var a=Math.abs(e-W)<=f;var d=Math.abs(Y-A)<=f;var X=Math.abs(g-V)<=f;if(k){i.position.top=Z._convertPositionTo("relative",{top:l-Z.helperProportions.height,left:0}).top-Z.margins.top}if(a){i.position.top=Z._convertPositionTo("relative",{top:e,left:0}).top-Z.margins.top}if(d){i.position.left=Z._convertPositionTo("relative",{top:0,left:Y-Z.helperProportions.width}).left-Z.margins.left}if(X){i.position.left=Z._convertPositionTo("relative",{top:0,left:g}).left-Z.margins.left}}var h=(k||a||d||X);if(b.snapMode!="outer"){var k=Math.abs(l-W)<=f;var a=Math.abs(e-U)<=f;var d=Math.abs(Y-V)<=f;var X=Math.abs(g-A)<=f;if(k){i.position.top=Z._convertPositionTo("relative",{top:l,left:0}).top-Z.margins.top}if(a){i.position.top=Z._convertPositionTo("relative",{top:e-Z.helperProportions.height,left:0}).top-Z.margins.top}if(d){i.position.left=Z._convertPositionTo("relative",{top:0,left:Y}).left-Z.margins.left}if(X){i.position.left=Z._convertPositionTo("relative",{top:0,left:g-Z.helperProportions.width}).left-Z.margins.left}}if(!Z.snapElements[j].snapping&&(k||a||d||X||h)){(Z.options.snap.snap&&Z.options.snap.snap.call(Z.element,c,B.extend(Z._uiHash(),{snapItem:Z.snapElements[j].item})))}Z.snapElements[j].snapping=(k||a||d||X||h)}}});B.ui.plugin.add("draggable","stack",{start:function(H,I){var G=B(this).data("draggable").options;var J=B.makeArray(B(G.stack)).sort(function(C,D){return(parseInt(B(C).css("zIndex"),10)||0)-(parseInt(B(D).css("zIndex"),10)||0)});if(!J.length){return}var A=parseInt(J[0].style.zIndex)||0;B(J).each(function(C){this.style.zIndex=A+C});this[0].style.zIndex=A+J.length}});B.ui.plugin.add("draggable","zIndex",{start:function(A,G){var F=B(G.helper),H=B(this).data("draggable").options;if(F.css("zIndex")){H._zIndex=F.css("zIndex")}F.css("zIndex",H.zIndex)},stop:function(A,E){var F=B(this).data("draggable").options;if(F._zIndex){B(E.helper).css("zIndex",F._zIndex)}}})})(jQuery);(function(B){B.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var A=this.options,D=A.accept;this.isover=0;this.isout=1;this.accept=B.isFunction(D)?D:function(C){return C.is(D)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};B.ui.ddmanager.droppables[A.scope]=B.ui.ddmanager.droppables[A.scope]||[];B.ui.ddmanager.droppables[A.scope].push(this);(A.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var D=B.ui.ddmanager.droppables[this.options.scope];for(var A=0;A<D.length;A++){if(D[A]==this){D.splice(A,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(A,D){if(A=="accept"){this.accept=B.isFunction(D)?D:function(C){return C.is(D)}}B.Widget.prototype._setOption.apply(this,arguments)},_activate:function(D){var A=B.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(A&&this._trigger("activate",D,this.ui(A)))},_deactivate:function(D){var A=B.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(A&&this._trigger("deactivate",D,this.ui(A)))},_over:function(D){var A=B.ui.ddmanager.current;if(!A||(A.currentItem||A.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(A.currentItem||A.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",D,this.ui(A))}},_out:function(D){var A=B.ui.ddmanager.current;if(!A||(A.currentItem||A.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(A.currentItem||A.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",D,this.ui(A))}},_drop:function(F,G){var H=G||B.ui.ddmanager.current;if(!H||(H.currentItem||H.element)[0]==this.element[0]){return false}var A=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var C=B.data(this,"droppable");if(C.options.greedy&&!C.options.disabled&&C.options.scope==H.options.scope&&C.accept.call(C.element[0],(H.currentItem||H.element))&&B.ui.intersect(H,B.extend(C,{offset:C.element.offset()}),C.options.tolerance)){A=true;return false}});if(A){return false}if(this.accept.call(this.element[0],(H.currentItem||H.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",F,this.ui(H));return this.element}return false},ui:function(A){return{draggable:(A.currentItem||A.element),helper:A.helper,position:A.position,offset:A.positionAbs}}});B.extend(B.ui.droppable,{version:"1.8.1"});B.ui.intersect=function(P,T,U){if(!T.offset){return false}var a=(P.positionAbs||P.position.absolute).left,A=a+P.helperProportions.width,X=(P.positionAbs||P.position.absolute).top,Q=X+P.helperProportions.height;var S=T.offset.left,V=S+T.proportions.width,Y=T.offset.top,R=Y+T.proportions.height;switch(U){case"fit":return(S<a&&A<V&&Y<X&&Q<R);break;case"intersect":return(S<a+(P.helperProportions.width/2)&&A-(P.helperProportions.width/2)<V&&Y<X+(P.helperProportions.height/2)&&Q-(P.helperProportions.height/2)<R);break;case"pointer":var W=((P.positionAbs||P.position.absolute).left+(P.clickOffset||P.offset.click).left),Z=((P.positionAbs||P.position.absolute).top+(P.clickOffset||P.offset.click).top),b=B.ui.isOver(Z,W,Y,S,T.proportions.height,T.proportions.width);return b;break;case"touch":return((X>=Y&&X<=R)||(Q>=Y&&Q<=R)||(X<Y&&Q>R))&&((a>=S&&a<=V)||(A>=S&&A<=V)||(a<S&&A>V));break;default:return false;break}};B.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(I,A){var K=B.ui.ddmanager.droppables[I.options.scope]||[];var L=A?A.type:null;var J=(I.currentItem||I.element).find(":data(droppable)").andSelf();droppablesLoop:for(var M=0;M<K.length;M++){if(K[M].options.disabled||(I&&!K[M].accept.call(K[M].element[0],(I.currentItem||I.element)))){continue}for(var N=0;N<J.length;N++){if(J[N]==K[M].element[0]){K[M].proportions.height=0;continue droppablesLoop}}K[M].visible=K[M].element.css("display")!="none";if(!K[M].visible){continue}K[M].offset=K[M].element.offset();K[M].proportions={width:K[M].element[0].offsetWidth,height:K[M].element[0].offsetHeight};if(L=="mousedown"){K[M]._activate.call(K[M],A)}}},drop:function(E,A){var F=false;B.each(B.ui.ddmanager.droppables[E.options.scope]||[],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&B.ui.intersect(E,this,this.options.tolerance)){F=F||this._drop.call(this,A)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(E.currentItem||E.element))){this.isout=1;this.isover=0;this._deactivate.call(this,A)}});return F},drag:function(A,D){if(A.options.refreshPositions){B.ui.ddmanager.prepareOffsets(A,D)}B.each(B.ui.ddmanager.droppables[A.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var H=B.ui.intersect(A,this,this.options.tolerance);var J=!H&&this.isover==1?"isout":(H&&this.isover==0?"isover":null);if(!J){return}var I;if(this.options.greedy){var C=this.element.parents(":data(droppable):eq(0)");if(C.length){I=B.data(C[0],"droppable");I.greedyChild=(J=="isover"?1:0)}}if(I&&J=="isover"){I["isover"]=0;I["isout"]=1;I._out.call(I,D)}this[J]=1;this[J=="isout"?"isover":"isout"]=0;this[J=="isover"?"_over":"_out"].call(this,D);if(I&&J=="isout"){I["isout"]=0;I["isover"]=1;I._over.call(I,D)}})}}})(jQuery);(function(E){E.widget("ui.resizable",E.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var A=this,B=this.options;this.element.addClass("ui-resizable");E.extend(this,{_aspectRatio:!!(B.aspectRatio),aspectRatio:B.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:B.helper||B.ghost||B.animate?B.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&E.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(E('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=B.handles||(!E(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var N=this.handles.split(",");this.handles={};for(var K=0;K<N.length;K++){var C=E.trim(N[K]),M="ui-resizable-"+C;var L=E('<div class="ui-resizable-handle '+M+'"></div>');if(/sw|se|ne|nw/.test(C)){L.css({zIndex:++B.zIndex})}if("se"==C){L.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[C]=".ui-resizable-"+C;this.element.append(L)}}this._renderAxis=function(H){H=H||this.element;for(var G in this.handles){if(this.handles[G].constructor==String){this.handles[G]=E(this.handles[G],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var I=E(this.handles[G],this.element),P=0;P=/sw|ne|nw|se|n|s/.test(G)?I.outerHeight():I.outerWidth();var J=["padding",/ne|nw|n/.test(G)?"Top":/se|sw|s/.test(G)?"Bottom":/^e$/.test(G)?"Right":"Left"].join("");H.css(J,P);this._proportionallyResize()}if(!E(this.handles[G]).length){continue}}};this._renderAxis(this.element);this._handles=E(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!A.resizing){if(this.className){var G=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}A.axis=G&&G[1]?G[1]:"se"}});if(B.autoHide){this._handles.hide();E(this.element).addClass("ui-resizable-autohide").hover(function(){E(this).removeClass("ui-resizable-autohide");A._handles.show()},function(){if(!A.resizing){E(this).addClass("ui-resizable-autohide");A._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var B=function(C){E(C).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){B(this.element);var A=this.element;A.after(this.originalElement.css({position:A.css("position"),width:A.outerWidth(),height:A.outerHeight(),top:A.css("top"),left:A.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);B(this.originalElement);return this},_mouseCapture:function(A){var B=false;for(var C in this.handles){if(E(this.handles[C])[0]==A.target){B=true}}return !this.options.disabled&&B},_mouseStart:function(B){var A=this.options,C=this.element.position(),K=this.element;this.resizing=true;this.documentScroll={top:E(document).scrollTop(),left:E(document).scrollLeft()};if(K.is(".ui-draggable")||(/absolute/).test(K.css("position"))){K.css({position:"absolute",top:C.top,left:C.left})}if(E.browser.opera&&(/relative/).test(K.css("position"))){K.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var N=D(this.helper.css("left")),M=D(this.helper.css("top"));if(A.containment){N+=E(A.containment).scrollLeft()||0;M+=E(A.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:N,top:M};this.size=this._helper?{width:K.outerWidth(),height:K.outerHeight()}:{width:K.width(),height:K.height()};this.originalSize=this._helper?{width:K.outerWidth(),height:K.outerHeight()}:{width:K.width(),height:K.height()};this.originalPosition={left:N,top:M};this.sizeDiff={width:K.outerWidth()-K.width(),height:K.outerHeight()-K.height()};this.originalMousePosition={left:B.pageX,top:B.pageY};this.aspectRatio=(typeof A.aspectRatio=="number")?A.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var L=E(".ui-resizable-"+this.axis).css("cursor");E("body").css("cursor",L=="auto"?this.axis+"-resize":L);K.addClass("ui-resizable-resizing");this._propagate("start",B);return true},_mouseDrag:function(V){var C=this.helper,Z=this.options,B={},T=this,Y=this.originalMousePosition,R=this.axis;var S=(V.pageX-Y.left)||0,A=(V.pageY-Y.top)||0;var W=this._change[R];if(!W){return false}var U=W.apply(this,[V,S,A]),X=E.browser.msie&&E.browser.version<7,Q=this.sizeDiff;if(this._aspectRatio||V.shiftKey){U=this._updateRatio(U,V)}U=this._respectSize(U,V);this._propagate("resize",V);C.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(U);this._trigger("resize",V,this.ui());return false},_mouseStop:function(B){this.resizing=false;var N=this.options,T=this;if(this._helper){var S=this._proportionallyResizeElements,R=S.length&&(/textarea/i).test(S[0].nodeName),A=R&&E.ui.hasScroll(S[0],"left")?0:T.sizeDiff.height,O=R?0:T.sizeDiff.width;var P={width:(T.size.width-O),height:(T.size.height-A)},Q=(parseInt(T.element.css("left"),10)+(T.position.left-T.originalPosition.left))||null,C=(parseInt(T.element.css("top"),10)+(T.position.top-T.originalPosition.top))||null;if(!N.animate){this.element.css(E.extend(P,{top:C,left:Q}))}T.helper.height(T.size.height);T.helper.width(T.size.width);if(this._helper&&!N.animate){this._proportionallyResize()}}E("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",B);if(this._helper){this.helper.remove()}return false},_updateCache:function(B){var A=this.options;this.offset=this.helper.offset();if(F(B.left)){this.position.left=B.left}if(F(B.top)){this.position.top=B.top}if(F(B.height)){this.size.height=B.height}if(F(B.width)){this.size.width=B.width}},_updateRatio:function(C,A){var J=this.options,B=this.position,K=this.size,L=this.axis;if(C.height){C.width=(K.height*this.aspectRatio)}else{if(C.width){C.height=(K.width/this.aspectRatio)}}if(L=="sw"){C.left=B.left+(K.width-C.width);C.top=null}if(L=="nw"){C.top=B.top+(K.height-C.height);C.left=B.left+(K.width-C.width)}return C},_respectSize:function(B,d){var U=this.helper,S=this.options,V=this._aspectRatio||d.shiftKey,Z=this.axis,A=F(B.width)&&S.maxWidth&&(S.maxWidth<B.width),b=F(B.height)&&S.maxHeight&&(S.maxHeight<B.height),X=F(B.width)&&S.minWidth&&(S.minWidth>B.width),W=F(B.height)&&S.minHeight&&(S.minHeight>B.height);if(X){B.width=S.minWidth}if(W){B.height=S.minHeight}if(A){B.width=S.maxWidth}if(b){B.height=S.maxHeight}var C=this.originalPosition.left+this.originalSize.width,T=this.position.top+this.size.height;var Y=/sw|nw|w/.test(Z),c=/nw|ne|n/.test(Z);if(X&&Y){B.left=C-S.minWidth}if(A&&Y){B.left=C-S.maxWidth}if(W&&c){B.top=T-S.minHeight}if(b&&c){B.top=T-S.maxHeight}var a=!B.width&&!B.height;if(a&&!B.left&&B.top){B.top=null}else{if(a&&!B.top&&B.left){B.left=null}}return B},_proportionallyResize:function(){var J=this.options;if(!this._proportionallyResizeElements.length){return}var B=this.helper||this.element;for(var C=0;C<this._proportionallyResizeElements.length;C++){var A=this._proportionallyResizeElements[C];if(!this.borderDif){var K=[A.css("borderTopWidth"),A.css("borderRightWidth"),A.css("borderBottomWidth"),A.css("borderLeftWidth")],L=[A.css("paddingTop"),A.css("paddingRight"),A.css("paddingBottom"),A.css("paddingLeft")];this.borderDif=E.map(K,function(I,G){var N=parseInt(I,10)||0,H=parseInt(L[G],10)||0;return N+H})}if(E.browser.msie&&!(!(E(B).is(":hidden")||E(B).parents(":hidden").length))){continue}A.css({height:(B.height()-this.borderDif[0]-this.borderDif[2])||0,width:(B.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var C=this.element,I=this.options;this.elementOffset=C.offset();if(this._helper){this.helper=this.helper||E('<div style="overflow:hidden;"></div>');var A=E.browser.msie&&E.browser.version<7,B=(A?1:0),J=(A?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+J,height:this.element.outerHeight()+J,position:"absolute",left:this.elementOffset.left-B+"px",top:this.elementOffset.top-B+"px",zIndex:++I.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(A,C,B){return{width:this.originalSize.width+C}},w:function(B,A,C){var J=this.options,L=this.originalSize,K=this.originalPosition;return{left:K.left+A,width:L.width-A}},n:function(B,A,C){var J=this.options,L=this.originalSize,K=this.originalPosition;return{top:K.top+C,height:L.height-C}},s:function(A,C,B){return{height:this.originalSize.height+B}},se:function(A,C,B){return E.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[A,C,B]))},sw:function(A,C,B){return E.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[A,C,B]))},ne:function(A,C,B){return E.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[A,C,B]))},nw:function(A,C,B){return E.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[A,C,B]))}},_propagate:function(A,B){E.ui.plugin.call(this,A,[B,this.ui()]);(A!="resize"&&this._trigger(A,B,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});E.extend(E.ui.resizable,{version:"1.8.1"});E.ui.plugin.add("resizable","alsoResize",{start:function(B,C){var I=E(this).data("resizable"),A=I.options;var J=function(G){E(G).each(function(){E(this).data("resizable-alsoresize",{width:parseInt(E(this).width(),10),height:parseInt(E(this).height(),10),left:parseInt(E(this).css("left"),10),top:parseInt(E(this).css("top"),10)})})};if(typeof(A.alsoResize)=="object"&&!A.alsoResize.parentNode){if(A.alsoResize.length){A.alsoResize=A.alsoResize[0];J(A.alsoResize)}else{E.each(A.alsoResize,function(G,H){J(G)})}}else{J(A.alsoResize)}},resize:function(L,N){var M=E(this).data("resizable"),B=M.options,A=M.originalSize,P=M.originalPosition;var C={height:(M.size.height-A.height)||0,width:(M.size.width-A.width)||0,top:(M.position.top-P.top)||0,left:(M.position.left-P.left)||0},O=function(G,H){E(G).each(function(){var J=E(this),R=E(this).data("resizable-alsoresize"),K={},I=H&&H.length?H:["width","height","top","left"];E.each(I||["width","height","top","left"],function(Q,U){var V=(R[U]||0)+(C[U]||0);if(V&&V>=0){K[U]=V||null}});if(/relative/.test(J.css("position"))&&E.browser.opera){M._revertToRelativePosition=true;J.css({position:"absolute",top:"auto",left:"auto"})}J.css(K)})};if(typeof(B.alsoResize)=="object"&&!B.alsoResize.nodeType){E.each(B.alsoResize,function(G,H){O(G,H)})}else{O(B.alsoResize)}},stop:function(A,B){var C=E(this).data("resizable");if(C._revertToRelativePosition&&E.browser.opera){C._revertToRelativePosition=false;el.css({position:"relative"})}E(this).removeData("resizable-alsoresize-start")}});E.ui.plugin.add("resizable","animate",{stop:function(S,R){var Q=E(this).data("resizable"),P=Q.options;var U=Q._proportionallyResizeElements,T=U.length&&(/textarea/i).test(U[0].nodeName),A=T&&E.ui.hasScroll(U[0],"left")?0:Q.sizeDiff.height,O=T?0:Q.sizeDiff.width;var V={width:(Q.size.width-O),height:(Q.size.height-A)},C=(parseInt(Q.element.css("left"),10)+(Q.position.left-Q.originalPosition.left))||null,B=(parseInt(Q.element.css("top"),10)+(Q.position.top-Q.originalPosition.top))||null;Q.element.animate(E.extend(V,B&&C?{top:B,left:C}:{}),{duration:P.animateDuration,easing:P.animateEasing,step:function(){var G={width:parseInt(Q.element.css("width"),10),height:parseInt(Q.element.css("height"),10),top:parseInt(Q.element.css("top"),10),left:parseInt(Q.element.css("left"),10)};if(U&&U.length){E(U[0]).css({width:G.width,height:G.height})}Q._updateCache(G);Q._propagate("resize",S)}})}});E.ui.plugin.add("resizable","containment",{start:function(C,V){var U=E(this).data("resizable"),A=U.options,b=U.element;var Z=A.containment,R=(Z instanceof E)?Z.get(0):(/parent/.test(Z))?b.parent().get(0):Z;if(!R){return}U.containerElement=E(R);if(/document/.test(Z)||Z==document){U.containerOffset={left:0,top:0};U.containerPosition={left:0,top:0};U.parentData={element:E(document),left:0,top:0,width:E(document).width(),height:E(document).height()||document.body.parentNode.scrollHeight}}else{var Y=E(R),W=[];E(["Top","Right","Left","Bottom"]).each(function(G,H){W[G]=D(Y.css("padding"+H))});U.containerOffset=Y.offset();U.containerPosition=Y.position();U.containerSize={height:(Y.innerHeight()-W[3]),width:(Y.innerWidth()-W[1])};var B=U.containerOffset,X=U.containerSize.height,S=U.containerSize.width,T=(E.ui.hasScroll(R,"left")?R.scrollWidth:S),a=(E.ui.hasScroll(R)?R.scrollHeight:X);U.parentData={element:R,left:B.left,top:B.top,width:T,height:a}}},resize:function(d,X){var T=E(this).data("resizable"),S=T.options,U=T.containerSize,C=T.containerOffset,W=T.size,Z=T.position,V=T._aspectRatio||d.shiftKey,A={top:0,left:0},a=T.containerElement;if(a[0]!=document&&(/static/).test(a.css("position"))){A=C}if(Z.left<(T._helper?C.left:0)){T.size.width=T.size.width+(T._helper?(T.position.left-C.left):(T.position.left-A.left));if(V){T.size.height=T.size.width/S.aspectRatio}T.position.left=S.helper?C.left:0}if(Z.top<(T._helper?C.top:0)){T.size.height=T.size.height+(T._helper?(T.position.top-C.top):T.position.top);if(V){T.size.width=T.size.height*S.aspectRatio}T.position.top=T._helper?C.top:0}T.offset.left=T.parentData.left+T.position.left;T.offset.top=T.parentData.top+T.position.top;var B=Math.abs((T._helper?T.offset.left-A.left:(T.offset.left-A.left))+T.sizeDiff.width),Y=Math.abs((T._helper?T.offset.top-A.top:(T.offset.top-C.top))+T.sizeDiff.height);var b=T.containerElement.get(0)==T.element.parent().get(0),c=/relative|absolute/.test(T.containerElement.css("position"));if(b&&c){B-=T.parentData.left}if(B+T.size.width>=T.parentData.width){T.size.width=T.parentData.width-B;if(V){T.size.height=T.size.width/T.aspectRatio}}if(Y+T.size.height>=T.parentData.height){T.size.height=T.parentData.height-Y;if(V){T.size.width=T.size.height*T.aspectRatio}}},stop:function(B,W){var R=E(this).data("resizable"),X=R.options,Q=R.position,U=R.containerOffset,C=R.containerPosition,S=R.containerElement;var P=E(R.helper),V=P.offset(),T=P.outerWidth()-R.sizeDiff.width,A=P.outerHeight()-R.sizeDiff.height;if(R._helper&&!X.animate&&(/relative/).test(S.css("position"))){E(this).css({left:V.left-C.left-U.left,width:T,height:A})}if(R._helper&&!X.animate&&(/static/).test(S.css("position"))){E(this).css({left:V.left-C.left-U.left,width:T,height:A})}}});E.ui.plugin.add("resizable","ghost",{start:function(B,C){var I=E(this).data("resizable"),A=I.options,J=I.size;I.ghost=I.originalElement.clone();I.ghost.css({opacity:0.25,display:"block",position:"relative",height:J.height,width:J.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof A.ghost=="string"?A.ghost:"");I.ghost.appendTo(I.helper)},resize:function(B,C){var H=E(this).data("resizable"),A=H.options;if(H.ghost){H.ghost.css({position:"relative",height:H.size.height,width:H.size.width})}},stop:function(B,C){var H=E(this).data("resizable"),A=H.options;if(H.ghost&&H.helper){H.helper.get(0).removeChild(H.ghost.get(0))}}});E.ui.plugin.add("resizable","grid",{resize:function(B,U){var A=E(this).data("resizable"),V=A.options,T=A.size,O=A.originalSize,P=A.originalPosition,Q=A.axis,C=V._aspectRatio||B.shiftKey;V.grid=typeof V.grid=="number"?[V.grid,V.grid]:V.grid;var S=Math.round((T.width-O.width)/(V.grid[0]||1))*(V.grid[0]||1),R=Math.round((T.height-O.height)/(V.grid[1]||1))*(V.grid[1]||1);if(/^(se|s|e)$/.test(Q)){A.size.width=O.width+S;A.size.height=O.height+R}else{if(/^(ne)$/.test(Q)){A.size.width=O.width+S;A.size.height=O.height+R;A.position.top=P.top-R}else{if(/^(sw)$/.test(Q)){A.size.width=O.width+S;A.size.height=O.height+R;A.position.left=P.left-S}else{A.size.width=O.width+S;A.size.height=O.height+R;A.position.top=P.top-R;A.position.left=P.left-S}}}}});var D=function(A){return parseInt(A,10)||0};var F=function(A){return !isNaN(parseInt(A,10))}})(jQuery);(function(B){B.widget("ui.selectable",B.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var A=this;this.element.addClass("ui-selectable");this.dragged=false;var D;this.refresh=function(){D=B(A.options.filter,A.element[0]);D.each(function(){var C=B(this);var F=C.offset();B.data(this,"selectable-item",{element:this,$element:C,left:F.left,top:F.top,right:F.left+C.outerWidth(),bottom:F.top+C.outerHeight(),startselected:false,selected:C.hasClass("ui-selected"),selecting:C.hasClass("ui-selecting"),unselecting:C.hasClass("ui-unselecting")})})};this.refresh();this.selectees=D.addClass("ui-selectee");this._mouseInit();this.helper=B(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(A){var E=this;this.opos=[A.pageX,A.pageY];if(this.options.disabled){return}var F=this.options;this.selectees=B(F.filter,this.element[0]);this._trigger("start",A);B(F.appendTo).append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":A.clientX,"top":A.clientY,"width":0,"height":0});if(F.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var C=B.data(this,"selectable-item");C.startselected=true;if(!A.metaKey){C.$element.removeClass("ui-selected");C.selected=false;C.$element.addClass("ui-unselecting");C.unselecting=true;E._trigger("unselecting",A,{unselecting:C.element})}});B(A.target).parents().andSelf().each(function(){var C=B.data(this,"selectable-item");if(C){C.$element.removeClass("ui-unselecting").addClass("ui-selecting");C.unselecting=false;C.selecting=true;C.selected=true;E._trigger("selecting",A,{selecting:C.element});return false}})},_mouseDrag:function(P){var J=this;this.dragged=true;if(this.options.disabled){return}var A=this.options;var K=this.opos[0],L=this.opos[1],O=P.pageX,N=P.pageY;if(K>O){var M=O;O=K;K=M}if(L>N){var M=N;N=L;L=M}this.helper.css({left:K,top:L,width:O-K,height:N-L});this.selectees.each(function(){var D=B.data(this,"selectable-item");if(!D||D.element==J.element[0]){return}var C=false;if(A.tolerance=="touch"){C=(!(D.left>O||D.right<K||D.top>N||D.bottom<L))}else{if(A.tolerance=="fit"){C=(D.left>K&&D.right<O&&D.top>L&&D.bottom<N)}}if(C){if(D.selected){D.$element.removeClass("ui-selected");D.selected=false}if(D.unselecting){D.$element.removeClass("ui-unselecting");D.unselecting=false}if(!D.selecting){D.$element.addClass("ui-selecting");D.selecting=true;J._trigger("selecting",P,{selecting:D.element})}}else{if(D.selecting){if(P.metaKey&&D.startselected){D.$element.removeClass("ui-selecting");D.selecting=false;D.$element.addClass("ui-selected");D.selected=true}else{D.$element.removeClass("ui-selecting");D.selecting=false;if(D.startselected){D.$element.addClass("ui-unselecting");D.unselecting=true}J._trigger("unselecting",P,{unselecting:D.element})}}if(D.selected){if(!P.metaKey&&!D.startselected){D.$element.removeClass("ui-selected");D.selected=false;D.$element.addClass("ui-unselecting");D.unselecting=true;J._trigger("unselecting",P,{unselecting:D.element})}}}});return false},_mouseStop:function(A){var E=this;this.dragged=false;var F=this.options;B(".ui-unselecting",this.element[0]).each(function(){var C=B.data(this,"selectable-item");C.$element.removeClass("ui-unselecting");C.unselecting=false;C.startselected=false;E._trigger("unselected",A,{unselected:C.element})});B(".ui-selecting",this.element[0]).each(function(){var C=B.data(this,"selectable-item");C.$element.removeClass("ui-selecting").addClass("ui-selected");C.selecting=false;C.selected=true;C.startselected=true;E._trigger("selected",A,{selected:C.element})});this._trigger("stop",A);this.helper.remove();return false}});B.extend(B.ui.selectable,{version:"1.8.1"})})(jQuery);(function(B){B.widget("ui.sortable",B.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,itemHeight:false},_create:function(){var A=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var A=this.items.length-1;A>=0;A--){this.items[A].item.removeData("sortable-item")}return this},_setOption:function(A,D){if(A==="disabled"){this.options[A]=D;this.widget()[D?"addClass":"removeClass"]("ui-sortable-disabled")}else{B.Widget.prototype._setOption.apply(self,arguments)}},_mouseCapture:function(J,H){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(J);var K=null,A=this,L=B(J.target).parents().each(function(){if(B.data(this,"sortable-item")==A){K=B(this);return false}});if(B.data(J.target,"sortable-item")==A){K=B(J.target)}if(!K){return false}if(this.options.handle&&!H){var I=false;B(this.options.handle,K).find("*").andSelf().each(function(){if(this==J.target){I=true}});if(!I){return false}}this.currentItem=K;this._removeCurrentsFromItems();return true},_mouseStart:function(J,H,L){var I=this.options,A=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(J);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");B.extend(this.offset,{click:{left:J.pageX-this.offset.left,top:J.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(J);this.originalPageX=J.pageX;this.originalPageY=J.pageY;(I.cursorAt&&this._adjustOffsetFromHelper(I.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(I.containment){this._setContainment()}if(I.cursor){if(B("body").css("cursor")){this._storedCursor=B("body").css("cursor")}B("body").css("cursor",I.cursor)}if(I.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",I.opacity)}if(I.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",I.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",J,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!L){for(var K=this.containers.length-1;K>=0;K--){this.containers[K]._trigger("activate",J,A._uiHash(this))}}if(B.ui.ddmanager){B.ui.ddmanager.current=this}if(B.ui.ddmanager&&!I.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,J)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(J);return true},_mouseDrag:function(I){this.position=this._generatePosition(I);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var J=this.options,A=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-I.pageY<J.scrollSensitivity){this.scrollParent[0].scrollTop=A=this.scrollParent[0].scrollTop+J.scrollSpeed}else{if(I.pageY-this.overflowOffset.top<J.scrollSensitivity){this.scrollParent[0].scrollTop=A=this.scrollParent[0].scrollTop-J.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-I.pageX<J.scrollSensitivity){this.scrollParent[0].scrollLeft=A=this.scrollParent[0].scrollLeft+J.scrollSpeed}else{if(I.pageX-this.overflowOffset.left<J.scrollSensitivity){this.scrollParent[0].scrollLeft=A=this.scrollParent[0].scrollLeft-J.scrollSpeed}}}else{if(I.pageY-B(document).scrollTop()<J.scrollSensitivity){A=B(document).scrollTop(B(document).scrollTop()-J.scrollSpeed)}else{if(B(window).height()-(I.pageY-B(document).scrollTop())<J.scrollSensitivity){A=B(document).scrollTop(B(document).scrollTop()+J.scrollSpeed)}}if(I.pageX-B(document).scrollLeft()<J.scrollSensitivity){A=B(document).scrollLeft(B(document).scrollLeft()-J.scrollSpeed)}else{if(B(window).width()-(I.pageX-B(document).scrollLeft())<J.scrollSensitivity){A=B(document).scrollLeft(B(document).scrollLeft()+J.scrollSpeed)}}}if(A!==false&&B.ui.ddmanager&&!J.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,I)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var L=this.items.length-1;L>=0;L--){var K=this.items[L],N=K.item[0],M=this._intersectsWithPointer(K);if(!M){continue}if(N!=this.currentItem[0]&&this.placeholder[M==1?"next":"prev"]()[0]!=N&&!B.ui.contains(this.placeholder[0],N)&&(this.options.type=="semi-dynamic"?!B.ui.contains(this.element[0],N):true)){this.direction=M==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(K)){this._rearrange(I,K)}else{break}this._trigger("change",I,this._uiHash());break}}this._contactContainers(I);if(B.ui.ddmanager){B.ui.ddmanager.drag(this,I)}this._trigger("sort",I,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(F,A){if(!F){return}if(B.ui.ddmanager&&!this.options.dropBehaviour){B.ui.ddmanager.drop(this,F)}if(this.options.revert){var H=this;var G=H.placeholder.offset();H.reverting=true;B(this.helper).animate({left:G.left-this.offset.parent.left-H.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:G.top-this.offset.parent.top-H.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){H._clear(F)})}else{this._clear(F,A)}return false},cancel:function(){var D=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var A=this.containers.length-1;A>=0;A--){this.containers[A]._trigger("deactivate",null,D._uiHash(this));if(this.containers[A].containerCache.over){this.containers[A]._trigger("out",null,D._uiHash(this));this.containers[A].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}B.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){B(this.domPosition.prev).after(this.currentItem)}else{B(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(E){var A=this._getItemsAsjQuery(E&&E.connected);var F=[];E=E||{};B(A).each(function(){var C=(B(E.item||this).attr(E.attribute||"id")||"").match(E.expression||(/(.+)[-=_](.+)/));if(C){F.push((E.key||C[1]+"[]")+"="+(E.key&&E.expression?C[1]:C[2]))}});return F.join("&")},toArray:function(E){var A=this._getItemsAsjQuery(E&&E.connected);var F=[];E=E||{};A.each(function(){F.push(B(E.item||this).attr(E.attribute||"id")||"")});return F},_intersectsWith:function(Q){var S=this.positionAbs.left,T=S+this.helperProportions.width,V=this.positionAbs.top,U=V+this.helperProportions.height;var O=Q.left,R=O+Q.width,W=Q.top,X=W+Q.height;var A=this.offset.click.top,N=this.offset.click.left;var P=(V+A)>W&&(V+A)<X&&(S+N)>O&&(S+N)<R;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>Q[this.floating?"width":"height"])){return P}else{return(O<S+(this.helperProportions.width/2)&&T-(this.helperProportions.width/2)<R&&W<V+(this.helperProportions.height/2)&&U-(this.helperProportions.height/2)<X)}},_intersectsWithPointer:function(J){var K=B.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,J.top,this.options.itemHeight?this.options.itemHeight:J.height),H=B.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,J.left,J.width),L=K&&H,I=this._getDragVerticalDirection(),A=this._getDragHorizontalDirection();if(!L){return false}return this.floating?(((A&&A=="right")||I=="down")?2:1):(I&&(I=="down"?2:1))},_intersectsWithSides:function(J){var I=B.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,J.top+(J.height/2),J.height),G=B.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,J.left+(J.width/2),J.width),A=this._getDragVerticalDirection(),H=this._getDragHorizontalDirection();if(this.floating&&H){return((H=="right"&&G)||(H=="left"&&!G))}else{return A&&((A=="down"&&I)||(A=="up"&&!I))}},_getDragVerticalDirection:function(){var A=this.positionAbs.top-this.lastPositionAbs.top;return A!=0&&(A>0?"down":"up")},_getDragHorizontalDirection:function(){var A=this.positionAbs.left-this.lastPositionAbs.left;return A!=0&&(A>0?"right":"left")},refresh:function(A){this._refreshItems(A);this.refreshPositions();return this},_connectWith:function(){var A=this.options;return A.connectWith.constructor==String?[A.connectWith]:A.connectWith},_getItemsAsjQuery:function(M){var A=this;var K=[];var N=[];var R=this._connectWith();if(R&&M){for(var O=R.length-1;O>=0;O--){var L=B(R[O]);for(var Q=L.length-1;Q>=0;Q--){var P=B.data(L[Q],"sortable");if(P&&P!=this&&!P.options.disabled){N.push([B.isFunction(P.options.items)?P.options.items.call(P.element):B(P.options.items,P.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),P])}}}}N.push([B.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):B(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var O=N.length-1;O>=0;O--){N[O][0].each(function(){K.push(this)})}return B(K)},_removeCurrentsFromItems:function(){var F=this.currentItem.find(":data(sortable-item)");for(var E=0;E<this.items.length;E++){for(var A=0;A<F.length;A++){if(F[A]==this.items[E].item[0]){this.items.splice(E,1)}}}},_refreshItems:function(V){this.items=[];this.containers=[this];var R=this.items;var A=this;var W=[[B.isFunction(this.options.items)?this.options.items.call(this.element[0],V,{item:this.currentItem}):B(this.options.items,this.element),this]];var Q=this._connectWith();if(Q){for(var O=Q.length-1;O>=0;O--){var T=B(Q[O]);for(var P=T.length-1;P>=0;P--){var X=B.data(T[P],"sortable");if(X&&X!=this&&!X.options.disabled){W.push([B.isFunction(X.options.items)?X.options.items.call(X.element[0],V,{item:this.currentItem}):B(X.options.items,X.element),X]);this.containers.push(X)}}}}for(var O=W.length-1;O>=0;O--){var S=W[O][1];var Z=W[O][0];for(var P=0,Y=Z.length;P<Y;P++){var U=B(Z[P]);U.data("sortable-item",S);R.push({item:U,instance:S,width:0,height:0,left:0,top:0})}}},refreshPositions:function(G){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var I=this.items.length-1;I>=0;I--){var H=this.items[I];var A=this.options.toleranceElement?B(this.options.toleranceElement,H.item):H.item;if(!G){H.width=A.outerWidth();H.height=A.outerHeight()}var J=A.offset();H.left=J.left;H.top=J.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var I=this.containers.length-1;I>=0;I--){var J=this.containers[I].element.offset();this.containers[I].containerCache.left=J.left;this.containers[I].containerCache.top=J.top;this.containers[I].containerCache.width=this.containers[I].element.outerWidth();this.containers[I].containerCache.height=this.containers[I].element.outerHeight()}}return this},_createPlaceholder:function(A){var H=A||this,F=H.options;if(!F.placeholder||F.placeholder.constructor==String){var G=F.placeholder;F.placeholder={element:function(){var C=B(document.createElement(H.currentItem[0].nodeName)).addClass(G||H.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!G){C.style.visibility="hidden"}return C},update:function(D,C){if(G&&!F.forcePlaceholderSize){return}if(!C.height()){C.height(H.currentItem.innerHeight()-parseInt(H.currentItem.css("paddingTop")||0,10)-parseInt(H.currentItem.css("paddingBottom")||0,10))}if(!C.width()){C.width(H.currentItem.innerWidth()-parseInt(H.currentItem.css("paddingLeft")||0,10)-parseInt(H.currentItem.css("paddingRight")||0,10))}}}}H.placeholder=B(F.placeholder.element.call(H.element,H.currentItem));H.currentItem.after(H.placeholder);F.placeholder.update(H,H.placeholder)},_contactContainers:function(Q){var A=null,P=null;for(var N=this.containers.length-1;N>=0;N--){if(B.ui.contains(this.currentItem[0],this.containers[N].element[0])){continue}if(this._intersectsWith(this.containers[N].containerCache)){if(A&&B.ui.contains(this.containers[N].element[0],A.element[0])){continue}A=this.containers[N];P=N}else{if(this.containers[N].containerCache.over){this.containers[N]._trigger("out",Q,this._uiHash(this));this.containers[N].containerCache.over=0}}}if(!A){return}if(this.containers.length===1){this.containers[P]._trigger("over",Q,this._uiHash(this));this.containers[P].containerCache.over=1}else{if(this.currentContainer!=this.containers[P]){var K=10000;var O=null;var M=this.positionAbs[this.containers[P].floating?"left":"top"];for(var R=this.items.length-1;R>=0;R--){if(!B.ui.contains(this.containers[P].element[0],this.items[R].item[0])){continue}var L=this.items[R][this.containers[P].floating?"left":"top"];if(Math.abs(L-M)<K){K=Math.abs(L-M);O=this.items[R]}}if(!O&&!this.options.dropOnEmpty){return}this.currentContainer=this.containers[P];O?this._rearrange(Q,O,null,true):this._rearrange(Q,null,this.containers[P].element,true);this._trigger("change",Q,this._uiHash());this.containers[P]._trigger("change",Q,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[P]._trigger("over",Q,this._uiHash(this));this.containers[P].containerCache.over=1}}},_createHelper:function(F){var E=this.options;var A=B.isFunction(E.helper)?B(E.helper.apply(this.element[0],[F,this.currentItem])):(E.helper=="clone"?this.currentItem.clone():this.currentItem);if(!A.parents("body").length){B(E.appendTo!="parent"?E.appendTo:this.currentItem[0].parentNode)[0].appendChild(A[0])}if(A[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(A[0].style.width==""||E.forceHelperSize){A.width(this.currentItem.width())}if(A[0].style.height==""||E.forceHelperSize){A.height(this.currentItem.height())}return A},_adjustOffsetFromHelper:function(A){if(typeof A=="string"){A=A.split(" ")}if(B.isArray(A)){A={left:+A[0],top:+A[1]||0}}if("left" in A){this.offset.click.left=A.left+this.margins.left}if("right" in A){this.offset.click.left=this.helperProportions.width-A.right+this.margins.left}if("top" in A){this.offset.click.top=A.top+this.margins.top}if("bottom" in A){this.offset.click.top=this.helperProportions.height-A.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var A=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0])){A.left+=this.scrollParent.scrollLeft();A.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&B.browser.msie)){A={top:0,left:0}}return{top:A.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:A.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var A=this.currentItem.position();return{top:A.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:A.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var H=this.options;if(H.containment=="parent"){H.containment=this.helper[0].parentNode}if(H.containment=="document"||H.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,B(H.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(B(H.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(H.containment)){var A=B(H.containment)[0];var G=B(H.containment).offset();var F=(B(A).css("overflow")!="hidden");this.containment=[G.left+(parseInt(B(A).css("borderLeftWidth"),10)||0)+(parseInt(B(A).css("paddingLeft"),10)||0)-this.margins.left,G.top+(parseInt(B(A).css("borderTopWidth"),10)||0)+(parseInt(B(A).css("paddingTop"),10)||0)-this.margins.top,G.left+(F?Math.max(A.scrollWidth,A.offsetWidth):A.offsetWidth)-(parseInt(B(A).css("borderLeftWidth"),10)||0)-(parseInt(B(A).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,G.top+(F?Math.max(A.scrollHeight,A.offsetHeight):A.offsetHeight)-(parseInt(B(A).css("borderTopWidth"),10)||0)-(parseInt(B(A).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(K,I){if(!I){I=this.position}var H=K=="absolute"?1:-1;var L=this.options,A=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,J=(/(html|body)/i).test(A[0].tagName);return{top:(I.top+this.offset.relative.top*H+this.offset.parent.top*H-(B.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(J?0:A.scrollTop()))*H)),left:(I.left+this.offset.relative.left*H+this.offset.parent.left*H-(B.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():J?0:A.scrollLeft())*H))}},_generatePosition:function(P){var A=this.options,J=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,K=(/(html|body)/i).test(J[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var N=P.pageX;var M=P.pageY;if(this.originalPosition){if(this.containment){if(P.pageX-this.offset.click.left<this.containment[0]){N=this.containment[0]+this.offset.click.left}if(P.pageY-this.offset.click.top<this.containment[1]){M=this.containment[1]+this.offset.click.top}if(P.pageX-this.offset.click.left>this.containment[2]){N=this.containment[2]+this.offset.click.left}if(P.pageY-this.offset.click.top>this.containment[3]){M=this.containment[3]+this.offset.click.top}}if(A.grid){var L=this.originalPageY+Math.round((M-this.originalPageY)/A.grid[1])*A.grid[1];M=this.containment?(!(L-this.offset.click.top<this.containment[1]||L-this.offset.click.top>this.containment[3])?L:(!(L-this.offset.click.top<this.containment[1])?L-A.grid[1]:L+A.grid[1])):L;var O=this.originalPageX+Math.round((N-this.originalPageX)/A.grid[0])*A.grid[0];N=this.containment?(!(O-this.offset.click.left<this.containment[0]||O-this.offset.click.left>this.containment[2])?O:(!(O-this.offset.click.left<this.containment[0])?O-A.grid[0]:O+A.grid[0])):O}}return{top:(M-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(B.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(K?0:J.scrollTop())))),left:(N-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(B.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():K?0:J.scrollLeft())))}},_rearrange:function(A,L,H,K){H?H[0].appendChild(this.placeholder[0]):L.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?L.item[0]:L.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var I=this,J=this.counter;window.setTimeout(function(){if(J==I.counter){I.refreshPositions(!K)}},0)},_clear:function(H,G){this.reverting=false;var A=[],J=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var I in this._storedCSS){if(this._storedCSS[I]=="auto"||this._storedCSS[I]=="static"){this._storedCSS[I]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!G){A.push(function(C){this._trigger("receive",C,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!G){A.push(function(C){this._trigger("update",C,this._uiHash())})}if(!B.ui.contains(this.element[0],this.currentItem[0])){if(!G){A.push(function(C){this._trigger("remove",C,this._uiHash())})}for(var I=this.containers.length-1;I>=0;I--){if(B.ui.contains(this.containers[I].element[0],this.currentItem[0])&&!G){A.push((function(C){return function(D){C._trigger("receive",D,this._uiHash(this))}}).call(this,this.containers[I]));A.push((function(C){return function(D){C._trigger("update",D,this._uiHash(this))}}).call(this,this.containers[I]))}}}for(var I=this.containers.length-1;I>=0;I--){if(!G){A.push((function(C){return function(D){C._trigger("deactivate",D,this._uiHash(this))}}).call(this,this.containers[I]))}if(this.containers[I].containerCache.over){A.push((function(C){return function(D){C._trigger("out",D,this._uiHash(this))}}).call(this,this.containers[I]));this.containers[I].containerCache.over=0}}if(this._storedCursor){B("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!G){this._trigger("beforeStop",H,this._uiHash());for(var I=0;I<A.length;I++){A[I].call(this,H)}this._trigger("stop",H,this._uiHash())}return false}if(!G){this._trigger("beforeStop",H,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!G){for(var I=0;I<A.length;I++){A[I].call(this,H)}this._trigger("stop",H,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(B.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(D){var A=D||this;return{helper:A.helper,placeholder:A.placeholder||B([]),position:A.position,originalPosition:A.originalPosition,offset:A.positionAbs,item:A.currentItem,sender:D?D.element:null}}});B.extend(B.ui.sortable,{version:"1.8.1"})})(jQuery);(function(B){B.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},_create:function(){var H=this.options,G=this;this.running=0;this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(H.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){B(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){B(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){B(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){B(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(H.navigation){var F=this.element.find("a").filter(H.navigationFilter);if(F.length){var A=F.closest(".ui-accordion-header");if(A.length){this.active=A}else{this.active=F.closest(".ui-accordion-content").prev()}}}this.active=this._findActive(this.active||H.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");this._createIcons();this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(C){return G._keydown(C)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!B.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(H.event){this.headers.bind((H.event)+".accordion",function(C){G._clickHandler.call(G,C,this);C.preventDefault()})}},_createIcons:function(){var A=this.options;if(A.icons){B("<span/>").addClass("ui-icon "+A.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(A.icons.header).toggleClass(A.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var A=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var D=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(A.autoHeight||A.fillHeight){D.css("height","")}return this},_setOption:function(A,D){B.Widget.prototype._setOption.apply(this,arguments);if(A=="active"){this.activate(D)}if(A=="icons"){this._destroyIcons();if(D){this._createIcons()}}},_keydown:function(J){var L=this.options,I=B.ui.keyCode;if(L.disabled||J.altKey||J.ctrlKey){return}var K=this.headers.length;var A=this.headers.index(J.target);var H=false;switch(J.keyCode){case I.RIGHT:case I.DOWN:H=this.headers[(A+1)%K];break;case I.LEFT:case I.UP:H=this.headers[(A-1+K)%K];break;case I.SPACE:case I.ENTER:this._clickHandler({target:J.target},J.target);J.preventDefault()}if(H){B(J.target).attr("tabIndex","-1");B(H).attr("tabIndex","0");H.focus();return false}return true},resize:function(){var F=this.options,A;if(F.fillSpace){if(B.browser.msie){var E=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}A=this.element.parent().height();if(B.browser.msie){this.element.parent().css("overflow",E)}this.headers.each(function(){A-=B(this).outerHeight(true)});this.headers.next().each(function(){B(this).height(Math.max(0,A-B(this).innerHeight()+B(this).height()))}).css("overflow","auto")}else{if(F.autoHeight){A=0;this.headers.next().each(function(){A=Math.max(A,B(this).height())}).height(A)}}return this},activate:function(D){this.options.active=D;var A=this._findActive(D)[0];this._clickHandler({target:A},A);return this},_findActive:function(A){return A?typeof A=="number"?this.headers.filter(":eq("+A+")"):this.headers.not(this.headers.not(A)):A===false?B([]):this.headers.filter(":eq(0)")},_clickHandler:function(Q,K){var N=this.options;if(N.disabled){return}if(!Q.target){if(!N.collapsible){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(N.icons.headerSelected).addClass(N.icons.header);this.active.next().addClass("ui-accordion-content-active");var A=this.active.next(),P={options:N,newHeader:B([]),oldHeader:N.active,newContent:B([]),oldContent:A},O=(this.active=B([]));this._toggle(O,A,P);return}var L=B(Q.currentTarget||K);var R=L[0]==this.active[0];N.active=N.collapsible&&R?false:B(".ui-accordion-header",this.element).index(L);if(this.running||(!N.collapsible&&R)){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(N.icons.headerSelected).addClass(N.icons.header);if(!R){L.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(N.icons.header).addClass(N.icons.headerSelected);L.next().addClass("ui-accordion-content-active")}var O=L.next(),A=this.active.next(),P={options:N,newHeader:R&&N.collapsible?B([]):L,oldHeader:this.active,newContent:R&&N.collapsible?B([]):O,oldContent:A},M=this.headers.index(this.active[0])>this.headers.index(L[0]);this.active=R?B([]):L;this._toggle(O,A,P,R,M);return},_toggle:function(A,V,R,T,S){var N=this.options,P=this;this.toShow=A;this.toHide=V;this.data=R;var U=function(){if(!P){return}return P._completed.apply(P,arguments)};this._trigger("changestart",null,this.data);this.running=V.size()===0?A.size():V.size();if(N.animated){var Q={};if(N.collapsible&&T){Q={toShow:B([]),toHide:V,complete:U,down:S,autoHeight:N.autoHeight||N.fillSpace}}else{Q={toShow:A,toHide:V,complete:U,down:S,autoHeight:N.autoHeight||N.fillSpace}}if(!N.proxied){N.proxied=N.animated}if(!N.proxiedDuration){N.proxiedDuration=N.duration}N.animated=B.isFunction(N.proxied)?N.proxied(Q):N.proxied;N.duration=B.isFunction(N.proxiedDuration)?N.proxiedDuration(Q):N.proxiedDuration;var W=B.ui.accordion.animations,O=N.duration,X=N.animated;if(X&&!W[X]&&!B.easing[X]){X="slide"}if(!W[X]){W[X]=function(C){this.slide(C,{easing:X,duration:O||700})}}W[X](Q)}else{if(N.collapsible&&T){A.toggle()}else{V.hide();A.show()}U(true)}V.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();A.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(D){var A=this.options;this.running=D?0:--this.running;if(this.running){return}if(A.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}});B.extend(B.ui.accordion,{version:"1.8.1",animations:{slide:function(N,L){N=B.extend({easing:"swing",duration:300},N,L);if(!N.toHide.size()){N.toShow.animate({height:"show"},N);return}if(!N.toShow.size()){N.toHide.animate({height:"hide"},N);return}var P=N.toShow.css("overflow"),K=0,O={},A={},Q=["height","paddingTop","paddingBottom"],R;var M=N.toShow;R=M[0].style.width;M.width(parseInt(M.parent().width(),10)-parseInt(M.css("paddingLeft"),10)-parseInt(M.css("paddingRight"),10)-(parseInt(M.css("borderLeftWidth"),10)||0)-(parseInt(M.css("borderRightWidth"),10)||0));B.each(Q,function(D,E){A[E]="hide";var C=(""+B.css(N.toShow[0],E)).match(/^([\d+-.]+)(.*)$/);O[E]={value:C[1],unit:C[2]||"px"}});N.toShow.css({height:0,overflow:"hidden"}).show();N.toHide.filter(":hidden").each(N.complete).end().filter(":visible").animate(A,{step:function(D,C){if(C.prop=="height"){K=(C.end-C.start===0)?0:(C.now-C.start)/(C.end-C.start)}N.toShow[0].style[C.prop]=(K*O[C.prop].value)+O[C.prop].unit},duration:N.duration,easing:N.easing,complete:function(){if(!N.autoHeight){N.toShow.css("height","")}N.toShow.css("width",R);N.toShow.css({overflow:P});N.complete()}})},bounceslide:function(A){this.slide(A,{easing:A.down?"easeOutBounce":"swing",duration:A.down?1000:200})}}})})(jQuery);(function(B){B.widget("ui.autocomplete",{options:{minLength:1,delay:300},_create:function(){var A=this,D=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(F){var C=B.ui.keyCode;switch(F.keyCode){case C.PAGE_UP:A._move("previousPage",F);break;case C.PAGE_DOWN:A._move("nextPage",F);break;case C.UP:A._move("previous",F);F.preventDefault();break;case C.DOWN:A._move("next",F);F.preventDefault();break;case C.ENTER:if(A.menu.active){F.preventDefault()}case C.TAB:if(!A.menu.active){return}A.menu.select(F);break;case C.ESCAPE:A.element.val(A.term);A.close(F);break;case C.LEFT:case C.RIGHT:case C.SHIFT:case C.CONTROL:case C.ALT:break;default:clearTimeout(A.searching);A.searching=setTimeout(function(){A.search(null,F)},A.options.delay);break}}).bind("focus.autocomplete",function(){A.selectedItem=null;A.previous=A.element.val()}).bind("blur.autocomplete",function(C){clearTimeout(A.searching);A.closing=setTimeout(function(){A.close(C);A._change(C)},150)});this._initSource();this.response=function(){return A._response.apply(A,arguments)};this.menu=B("<ul></ul>").addClass("ui-autocomplete").appendTo("body",D).menu({focus:function(C,G){var H=G.item.data("item.autocomplete");if(false!==A._trigger("focus",null,{item:H})){if(/^key/.test(C.originalEvent.type)){A.element.val(H.value)}}},selected:function(C,I){var J=I.item.data("item.autocomplete");if(false!==A._trigger("select",C,{item:J})){A.element.val(J.value)}A.close(C);var H=A.previous;if(A.element[0]!==D.activeElement){A.element.focus();A.previous=H}A.selectedItem=J},blur:function(F,C){if(A.menu.element.is(":visible")){A.element.val(A.term)}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(B.fn.bgiframe){this.menu.element.bgiframe()}},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();B.Widget.prototype.destroy.call(this)},_setOption:function(A){B.Widget.prototype._setOption.apply(this,arguments);if(A==="source"){this._initSource()}},_initSource:function(){var A,D;if(B.isArray(this.options.source)){A=this.options.source;this.source=function(C,F){F(B.ui.autocomplete.filter(A,C.term))}}else{if(typeof this.options.source==="string"){D=this.options.source;this.source=function(C,F){B.getJSON(D,C,F)}}else{this.source=this.options.source}}},search:function(D,A){D=D!=null?D:this.element.val();if(D.length<this.options.minLength){return this.close(A)}clearTimeout(this.closing);if(this._trigger("search")===false){return}return this._search(D)},_search:function(A){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:A},this.response)},_response:function(A){if(A.length){A=this._normalize(A);this._suggest(A);this._trigger("open")}else{this.close()}this.element.removeClass("ui-autocomplete-loading")},close:function(A){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",A);this.menu.element.hide();this.menu.deactivate()}},_change:function(A){if(this.previous!==this.element.val()){this._trigger("change",A,{item:this.selectedItem})}},_normalize:function(A){if(A.length&&A[0].label&&A[0].value){return A}return B.map(A,function(D){if(typeof D==="string"){return{label:D,value:D}}return B.extend({label:D.label||D.value,value:D.value||D.label},D)})},_suggest:function(F){var A=this.menu.element.empty().zIndex(this.element.zIndex()+1),H,G;this._renderMenu(A,F);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position({my:"left top",at:"left bottom",of:this.element,collision:"none"});H=A.width("").width();G=this.element.width();A.width(Math.max(H,G))},_renderMenu:function(F,A){var E=this;B.each(A,function(C,D){E._renderItem(F,D)})},_renderItem:function(D,A){return B("<li></li>").data("item.autocomplete",A).append("<a>"+A.label+"</a>").appendTo(D)},_move:function(D,A){if(!this.menu.element.is(":visible")){this.search(null,A);return}if(this.menu.first()&&/^previous/.test(D)||this.menu.last()&&/^next/.test(D)){this.element.val(this.term);this.menu.deactivate();return}this.menu[D](A)},widget:function(){return this.menu.element}});B.extend(B.ui.autocomplete,{escapeRegex:function(A){return A.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")},filter:function(E,A){var F=new RegExp(B.ui.autocomplete.escapeRegex(A),"i");return B.grep(E,function(C){return F.test(C.label||C.value||C)})}})}(jQuery));(function(B){B.widget("ui.menu",{_create:function(){var A=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(D){if(!B(D.target).closest(".ui-menu-item a").length){return}D.preventDefault();A.select(D)});this.refresh()},refresh:function(){var A=this;var D=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");D.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(C){A.activate(C,B(this).parent())}).mouseleave(function(){A.deactivate()})},activate:function(H,G){this.deactivate();if(this.hasScroll()){var J=G.offset().top-this.element.offset().top,A=this.element.attr("scrollTop"),I=this.element.height();if(J<0){this.element.attr("scrollTop",A+J)}else{if(J>I){this.element.attr("scrollTop",A+J-I+G.height())}}}this.active=G.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",H,{item:G})},deactivate:function(){if(!this.active){return}this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null},next:function(A){this.move("next",".ui-menu-item:first",A)},previous:function(A){this.move("prev",".ui-menu-item:last",A)},first:function(){return this.active&&!this.active.prev().length},last:function(){return this.active&&!this.active.next().length},move:function(F,H,A){if(!this.active){this.activate(A,this.element.children(H));return}var G=this.active[F+"All"](".ui-menu-item").eq(0);if(G.length){this.activate(A,G)}else{this.activate(A,this.element.children(H))}},nextPage:function(A){if(this.hasScroll()){if(!this.active||this.last()){this.activate(A,this.element.children(":first"));return}var F=this.active.offset().top,G=this.element.height(),H=this.element.children("li").filter(function(){var C=B(this).offset().top-F-G+B(this).height();return C<10&&C>-10});if(!H.length){H=this.element.children(":last")}this.activate(A,H)}else{this.activate(A,this.element.children(!this.active||this.last()?":first":":last"))}},previousPage:function(F){if(this.hasScroll()){if(!this.active||this.first()){this.activate(F,this.element.children(":last"));return}var A=this.active.offset().top,E=this.element.height();result=this.element.children("li").filter(function(){var C=B(this).offset().top-A+E-B(this).height();return C<10&&C>-10});if(!result.length){result=this.element.children(":first")}this.activate(F,result)}else{this.activate(F,this.element.children(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(A){this._trigger("selected",A,{item:this.active})}})}(jQuery));(function(G){var I,L="ui-button ui-widget ui-state-default ui-corner-all",H="ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only",J=function(A){G(":ui-button",A.target.form).each(function(){var B=G(this).data("button");setTimeout(function(){B.refresh()},1)})},K=function(A){var B=A.name,C=A.form,D=G([]);if(B){if(C){D=G(C).find("[name='"+B+"']")}else{D=G("[name='"+B+"']",A.ownerDocument).filter(function(){return !this.form})}}return D};G.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",J);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var C=this,A=this.options,E=this.type==="checkbox"||this.type==="radio",B="ui-state-hover"+(!E?" ui-state-active":""),D="ui-state-focus";if(A.label===null){A.label=this.buttonElement.html()}if(this.element.is(":disabled")){A.disabled=true}this.buttonElement.addClass(L).attr("role","button").bind("mouseenter.button",function(){if(A.disabled){return}G(this).addClass("ui-state-hover");if(this===I){G(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){if(A.disabled){return}G(this).removeClass(B)}).bind("focus.button",function(){G(this).addClass(D)}).bind("blur.button",function(){G(this).removeClass(D)});if(E){this.element.bind("change.button",function(){C.refresh()})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(A.disabled){return false}G(this).toggleClass("ui-state-active");C.buttonElement.attr("aria-pressed",C.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(A.disabled){return false}G(this).addClass("ui-state-active");C.buttonElement.attr("aria-pressed",true);var F=C.element[0];K(F).not(F).map(function(){return G(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(A.disabled){return false}G(this).addClass("ui-state-active");I=this;G(document).one("mouseup",function(){I=null})}).bind("mouseup.button",function(){if(A.disabled){return false}G(this).removeClass("ui-state-active")}).bind("keydown.button",function(F){if(A.disabled){return false}if(F.keyCode==G.ui.keyCode.SPACE||F.keyCode==G.ui.keyCode.ENTER){G(this).addClass("ui-state-active")}}).bind("keyup.button",function(){G(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(F){if(F.keyCode===G.ui.keyCode.SPACE){G(this).click()}})}}}this._setOption("disabled",A.disabled)},_determineButtonType:function(){if(this.element.is(":checkbox")){this.type="checkbox"}else{if(this.element.is(":radio")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="button"}}}if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var A=this.element.is(":checked");if(A){this.buttonElement.addClass("ui-state-active")}this.buttonElement.attr("aria-pressed",A)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(L+" "+H).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}G.Widget.prototype.destroy.call(this)},_setOption:function(B,A){G.Widget.prototype._setOption.apply(this,arguments);if(B==="disabled"){if(A){this.element.attr("disabled",true)}else{this.element.removeAttr("disabled")}}this._resetButton()},refresh:function(){var A=this.element.is(":disabled");if(A!==this.options.disabled){this._setOption("disabled",A)}if(this.type==="radio"){K(this.element[0]).each(function(){if(G(this).is(":checked")){G(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true)}else{G(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true)}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var D=this.buttonElement,C=G("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(D.empty()).text(),B=this.options.icons,A=B.primary&&B.secondary;if(B.primary||B.secondary){D.addClass("ui-button-text-icon"+(A?"s":""));if(B.primary){D.prepend("<span class='ui-button-icon-primary ui-icon "+B.primary+"'></span>")}if(B.secondary){D.append("<span class='ui-button-icon-secondary ui-icon "+B.secondary+"'></span>")}if(!this.options.text){D.addClass(A?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon");if(!this.hasTitle){D.attr("title",C)}}}else{D.addClass("ui-button-text-only")}}});G.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(B,A){if(B==="disabled"){this.buttons.button("option",B,A)}G.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return G(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return G(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");G.Widget.prototype.destroy.call(this)}})}(jQuery));(function(C){var D="ui-dialog ui-widget ui-widget-content ui-corner-all ";C.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");var P=this,Q=P.options,B=Q.title||P.originalTitle||"&#160;",A=C.ui.dialog.getTitleId(P.element),M=(P.uiDialog=C("<div></div>")).appendTo(document.body).hide().addClass(D+Q.dialogClass).css({zIndex:Q.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(E){if(Q.closeOnEscape&&E.keyCode&&E.keyCode===C.ui.keyCode.ESCAPE){P.close(E);E.preventDefault()}}).attr({role:"dialog","aria-labelledby":A}).mousedown(function(E){P.moveToTop(false,E)}),S=P.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(M),O=(P.uiDialogTitlebar=C("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(M),T=C('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){T.addClass("ui-state-hover")},function(){T.removeClass("ui-state-hover")}).focus(function(){T.addClass("ui-state-focus")}).blur(function(){T.removeClass("ui-state-focus")}).click(function(E){P.close(E);return false}).appendTo(O),N=(P.uiDialogTitlebarCloseText=C("<span></span>")).addClass("ui-icon ui-icon-closethick").text(Q.closeText).appendTo(T),R=C("<span></span>").addClass("ui-dialog-title").attr("id",A).html(B).prependTo(O);if(C.isFunction(Q.beforeclose)&&!C.isFunction(Q.beforeClose)){Q.beforeClose=Q.beforeclose}O.find("*").add(O).disableSelection();if(Q.draggable&&C.fn.draggable){P._makeDraggable()}if(Q.resizable&&C.fn.resizable){P._makeResizable()}P._createButtons(Q.buttons);P._isOpen=false;if(C.fn.bgiframe){M.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var A=this;if(A.overlay){A.overlay.destroy()}A.uiDialog.hide();A.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");A.uiDialog.remove();if(A.originalTitle){A.element.attr("title",A.originalTitle)}return A},widget:function(){return this.uiDialog},close:function(A){var F=this,B;if(false===F._trigger("beforeClose",A)){return}if(F.overlay){F.overlay.destroy()}F.uiDialog.unbind("keypress.ui-dialog");F._isOpen=false;if(F.options.hide){F.uiDialog.hide(F.options.hide,function(){F._trigger("close",A)})}else{F.uiDialog.hide();F._trigger("close",A)}C.ui.dialog.overlay.resize();if(F.options.modal){B=0;C(".ui-dialog").each(function(){if(this!==F.uiDialog[0]){B=Math.max(B,C(this).css("z-index"))}});C.ui.dialog.maxZ=B}return F},isOpen:function(){return this._isOpen},moveToTop:function(I,B){var J=this,H=J.options,A;if((H.modal&&!I)||(!H.stack&&!H.modal)){return J._trigger("focus",B)}if(H.zIndex>C.ui.dialog.maxZ){C.ui.dialog.maxZ=H.zIndex}if(J.overlay){C.ui.dialog.maxZ+=1;J.overlay.$el.css("z-index",C.ui.dialog.overlay.maxZ=C.ui.dialog.maxZ)}A={scrollTop:J.element.attr("scrollTop"),scrollLeft:J.element.attr("scrollLeft")};C.ui.dialog.maxZ+=1;J.uiDialog.css("z-index",C.ui.dialog.maxZ);J.element.attr(A);J._trigger("focus",B);return J},open:function(){if(this._isOpen){return}var F=this,A=F.options,B=F.uiDialog;F.overlay=A.modal?new C.ui.dialog.overlay(F):null;if(B.next().length){B.appendTo("body")}F._size();F._position(A.position);B.show(A.show);F.moveToTop(true);if(A.modal){B.bind("keypress.ui-dialog",function(J){if(J.keyCode!==C.ui.keyCode.TAB){return}var E=C(":tabbable",this),K=E.filter(":first"),L=E.filter(":last");if(J.target===L[0]&&!J.shiftKey){K.focus(1);return false}else{if(J.target===K[0]&&J.shiftKey){L.focus(1);return false}}})}C([]).add(B.find(".ui-dialog-content :tabbable:first")).add(B.find(".ui-dialog-buttonpane :tabbable:first")).add(B).filter(":first").focus();F._trigger("open");F._isOpen=true;return F},_createButtons:function(G){var H=this,A=false,B=C("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");H.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof G==="object"&&G!==null){C.each(G,function(){return !(A=true)})}if(A){C.each(G,function(F,E){var J=C('<button type="button"></button>').text(F).click(function(){E.apply(H.element[0],arguments)}).appendTo(B);if(C.fn.button){J.button()}});B.appendTo(H.uiDialog)}},_makeDraggable:function(){var J=this,H=J.options,B=C(document),I;function A(E){return{position:E.position,offset:E.offset}}J.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(F,E){I=H.height==="auto"?"auto":C(this).height();C(this).height(C(this).height()).addClass("ui-dialog-dragging");J._trigger("dragStart",F,A(E))},drag:function(F,E){J._trigger("drag",F,A(E))},stop:function(F,E){H.position=[E.position.left-B.scrollLeft(),E.position.top-B.scrollTop()];C(this).removeClass("ui-dialog-dragging").height(I);J._trigger("dragStop",F,A(E));C.ui.dialog.overlay.resize()}})},_makeResizable:function(B){B=(B===undefined?this.options.resizable:B);var I=this,A=I.options,K=I.uiDialog.css("position"),J=(typeof B==="string"?B:"n,e,s,w,se,sw,ne,nw");function L(E){return{originalPosition:E.originalPosition,originalSize:E.originalSize,position:E.position,size:E.size}}I.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:I.element,maxWidth:A.maxWidth,maxHeight:A.maxHeight,minWidth:A.minWidth,minHeight:I._minHeight(),handles:J,start:function(F,E){C(this).addClass("ui-dialog-resizing");I._trigger("resizeStart",F,L(E))},resize:function(F,E){I._trigger("resize",F,L(E))},stop:function(F,E){C(this).removeClass("ui-dialog-resizing");A.height=C(this).height();A.width=C(this).width();I._trigger("resizeStop",F,L(E));C.ui.dialog.overlay.resize()}}).css("position",K).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var A=this.options;if(A.height==="auto"){return A.minHeight}else{return Math.min(A.minHeight,A.height)}},_position:function(G){var A=[],H=[0,0],B;G=G||C.ui.dialog.prototype.options.position;if(typeof G==="string"||(typeof G==="object"&&"0" in G)){A=G.split?G.split(" "):[G[0],G[1]];if(A.length===1){A[1]=A[0]}C.each(["left","top"],function(F,E){if(+A[F]===A[F]){H[F]=A[F];A[F]=E}})}else{if(typeof G==="object"){if("left" in G){A[0]="left";H[0]=G.left}else{if("right" in G){A[0]="right";H[0]=-G.right}}if("top" in G){A[1]="top";H[1]=G.top}else{if("bottom" in G){A[1]="bottom";H[1]=-G.bottom}}}}B=this.uiDialog.is(":visible");if(!B){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position({my:A.join(" "),at:A.join(" "),offset:H.join(" "),of:window,collision:"fit",using:function(E){var F=C(this).css(E).offset().top;if(F<0){C(this).css("top",E.top-F)}}});if(!B){this.uiDialog.hide()}},_setOption:function(I,B){var J=this,L=J.uiDialog,A=L.is(":data(resizable)"),K=false;switch(I){case"beforeclose":I="beforeClose";break;case"buttons":J._createButtons(B);break;case"closeText":J.uiDialogTitlebarCloseText.text(""+B);break;case"dialogClass":L.removeClass(J.options.dialogClass).addClass(D+B);break;case"disabled":if(B){L.addClass("ui-dialog-disabled")}else{L.removeClass("ui-dialog-disabled")}break;case"draggable":if(B){J._makeDraggable()}else{L.draggable("destroy")}break;case"height":K=true;break;case"maxHeight":if(A){L.resizable("option","maxHeight",B)}K=true;break;case"maxWidth":if(A){L.resizable("option","maxWidth",B)}K=true;break;case"minHeight":if(A){L.resizable("option","minHeight",B)}K=true;break;case"minWidth":if(A){L.resizable("option","minWidth",B)}K=true;break;case"position":J._position(B);break;case"resizable":if(A&&!B){L.resizable("destroy")}if(A&&typeof B==="string"){L.resizable("option","handles",B)}if(!A&&B!==false){J._makeResizable(B)}break;case"title":C(".ui-dialog-title",J.uiDialogTitlebar).html(""+(B||"&#160;"));break;case"width":K=true;break}C.Widget.prototype._setOption.apply(J,arguments);if(K){J._size()}},_size:function(){var A=this.options,B;this.element.css({width:"auto",minHeight:0,height:0});B=this.uiDialog.css({height:"auto",width:A.width}).height();this.element.css(A.height==="auto"?{minHeight:Math.max(A.minHeight-B,0),height:"auto"}:{minHeight:0,height:Math.max(A.height-B,0)}).show();if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}}});C.extend(C.ui.dialog,{version:"1.8.1",uuid:0,maxZ:0,getTitleId:function(B){var A=B.attr("id");if(!A){this.uuid+=1;A=this.uuid}return"ui-dialog-title-"+A},overlay:function(A){this.$el=C.ui.dialog.overlay.create(A)}});C.extend(C.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:C.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(A){return A+".dialog-overlay"}).join(" "),create:function(A){if(this.instances.length===0){setTimeout(function(){if(C.ui.dialog.overlay.instances.length){C(document).bind(C.ui.dialog.overlay.events,function(F){return(C(F.target).zIndex()>=C.ui.dialog.overlay.maxZ)})}},1);C(document).bind("keydown.dialog-overlay",function(F){if(A.options.closeOnEscape&&F.keyCode&&F.keyCode===C.ui.keyCode.ESCAPE){A.close(F);F.preventDefault()}});C(window).bind("resize.dialog-overlay",C.ui.dialog.overlay.resize)}var B=(this.oldInstances.pop()||C("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});if(C.fn.bgiframe){B.bgiframe()}this.instances.push(B);return B},destroy:function(B){this.oldInstances.push(this.instances.splice(C.inArray(B,this.instances),1)[0]);if(this.instances.length===0){C([document,window]).unbind(".dialog-overlay")}B.remove();var A=0;C.each(this.instances,function(){A=Math.max(A,this.css("z-index"))});this.maxZ=A},height:function(){var A,B;if(C.browser.msie&&C.browser.version<7){A=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);B=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(A<B){return C(window).height()+"px"}else{return A+"px"}}else{return C(document).height()+"px"}},width:function(){var A,B;if(C.browser.msie&&C.browser.version<7){A=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);B=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(A<B){return C(window).width()+"px"}else{return A+"px"}}else{return C(document).width()+"px"}},resize:function(){var A=C([]);C.each(C.ui.dialog.overlay.instances,function(){A=A.add(this)});A.css({width:0,height:0}).css({width:C.ui.dialog.overlay.width(),height:C.ui.dialog.overlay.height()})}});C.extend(C.ui.dialog.overlay.prototype,{destroy:function(){C.ui.dialog.overlay.destroy(this.$el)}})}(jQuery));(function(C){var D=5;C.widget("ui.slider",C.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var B=this,A=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(A.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=C([]);if(A.range){if(A.range===true){this.range=C("<div></div>");if(!A.values){A.values=[this._valueMin(),this._valueMin()]}if(A.values.length&&A.values.length!==2){A.values=[A.values[0],A.values[0]]}}else{this.range=C("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(A.range==="min"||A.range==="max"){this.range.addClass("ui-slider-range-"+A.range)}this.range.addClass("ui-widget-header")}if(C(".ui-slider-handle",this.element).length===0){C("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}if(A.values&&A.values.length){while(C(".ui-slider-handle",this.element).length<A.values.length){C("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}}this.handles=C(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(F){F.preventDefault()}).hover(function(){if(!A.disabled){C(this).addClass("ui-state-hover")}},function(){C(this).removeClass("ui-state-hover")}).focus(function(){if(!A.disabled){C(".ui-slider .ui-state-focus").removeClass("ui-state-focus");C(this).addClass("ui-state-focus")}else{C(this).blur()}}).blur(function(){C(this).removeClass("ui-state-focus")});this.handles.each(function(F){C(this).data("index.ui-slider-handle",F)});this.handles.keydown(function(N){var L=true,R=C(this).data("index.ui-slider-handle"),M,Q,O,P;if(B.options.disabled){return}switch(N.keyCode){case C.ui.keyCode.HOME:case C.ui.keyCode.END:case C.ui.keyCode.PAGE_UP:case C.ui.keyCode.PAGE_DOWN:case C.ui.keyCode.UP:case C.ui.keyCode.RIGHT:case C.ui.keyCode.DOWN:case C.ui.keyCode.LEFT:L=false;if(!B._keySliding){B._keySliding=true;C(this).addClass("ui-state-active");M=B._start(N,R);if(M===false){return}}break}P=B.options.step;if(B.options.values&&B.options.values.length){Q=O=B.values(R)}else{Q=O=B.value()}switch(N.keyCode){case C.ui.keyCode.HOME:O=B._valueMin();break;case C.ui.keyCode.END:O=B._valueMax();break;case C.ui.keyCode.PAGE_UP:O=Q+((B._valueMax()-B._valueMin())/D);break;case C.ui.keyCode.PAGE_DOWN:O=Q-((B._valueMax()-B._valueMin())/D);break;case C.ui.keyCode.UP:case C.ui.keyCode.RIGHT:if(Q===B._valueMax()){return}O=Q+P;break;case C.ui.keyCode.DOWN:case C.ui.keyCode.LEFT:if(Q===B._valueMin()){return}O=Q-P;break}B._slide(N,R,O);return L}).keyup(function(H){var G=C(this).data("index.ui-slider-handle");if(B._keySliding){B._keySliding=false;B._stop(H,G);B._change(H,G);C(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(B){var A=this.options,O,Q,V,U,P,S,R,T,N;if(A.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();O={x:B.pageX,y:B.pageY};Q=this._normValueFromMouse(O);V=this._valueMax()-this._valueMin()+1;P=this;this.handles.each(function(E){var F=Math.abs(Q-P.values(E));if(V>F){V=F;U=C(this);S=E}});if(A.range===true&&this.values(1)===A.min){S+=1;U=C(this.handles[S])}R=this._start(B,S);if(R===false){return false}this._mouseSliding=true;P._handleIndex=S;U.addClass("ui-state-active").focus();T=U.offset();N=!C(B.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=N?{left:0,top:0}:{left:B.pageX-T.left-(U.width()/2),top:B.pageY-T.top-(U.height()/2)-(parseInt(U.css("borderTopWidth"),10)||0)-(parseInt(U.css("borderBottomWidth"),10)||0)+(parseInt(U.css("marginTop"),10)||0)};Q=this._normValueFromMouse(O);this._slide(B,S,Q);this._animateOff=true;return true},_mouseStart:function(A){return true},_mouseDrag:function(A){var F={x:A.pageX,y:A.pageY},B=this._normValueFromMouse(F);this._slide(A,this._handleIndex,B);return false},_mouseStop:function(A){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(A,this._handleIndex);this._change(A,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(A){var B,I,J,K,L;if(this.orientation==="horizontal"){B=this.elementSize.width;I=A.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{B=this.elementSize.height;I=A.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}J=(I/B);if(J>1){J=1}if(J<0){J=0}if(this.orientation==="vertical"){J=1-J}K=this._valueMax()-this._valueMin();L=this._valueMin()+J*K;return this._trimAlignValue(L)},_start:function(F,A){var B={handle:this.handles[A],value:this.value()};if(this.options.values&&this.options.values.length){B.value=this.values(A);B.values=this.values()}return this._trigger("start",F,B)},_slide:function(A,B,J){var K,L,I;if(this.options.values&&this.options.values.length){K=this.values(B?0:1);if((this.options.values.length===2&&this.options.range===true)&&((B===0&&J>K)||(B===1&&J<K))){J=K}if(J!==this.values(B)){L=this.values();L[B]=J;I=this._trigger("slide",A,{handle:this.handles[B],value:J,values:L});K=this.values(B?0:1);if(I!==false){this.values(B,J,true)}}}else{if(J!==this.value()){I=this._trigger("slide",A,{handle:this.handles[B],value:J});if(I!==false){this.value(J)}}}},_stop:function(F,A){var B={handle:this.handles[A],value:this.value()};if(this.options.values&&this.options.values.length){B.value=this.values(A);B.values=this.values()}this._trigger("stop",F,B)},_change:function(F,A){if(!this._keySliding&&!this._mouseSliding){var B={handle:this.handles[A],value:this.value()};if(this.options.values&&this.options.values.length){B.value=this.values(A);B.values=this.values()}this._trigger("change",F,B)}},value:function(A){if(arguments.length){this.options.value=this._trimAlignValue(A);this._refreshValue();this._change(null,0)}return this._value()},values:function(I,B){var A,J,H;if(arguments.length>1){this.options.values[I]=this._trimAlignValue(B);this._refreshValue();this._change(null,I)}if(arguments.length){if(C.isArray(arguments[0])){A=this.options.values;J=arguments[0];for(H=0;H<A.length;H+=1){A[H]=this._trimAlignValue(J[H]);this._change(null,H)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(I)}else{return this.value()}}}else{return this._values()}},_setOption:function(H,A){var B,G=0;if(C.isArray(this.options.values)){G=this.options.values.length}C.Widget.prototype._setOption.apply(this,arguments);switch(H){case"disabled":if(A){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(B=0;B<G;B+=1){this._change(null,B)}this._animateOff=false;break}},_value:function(){var A=this.options.value;A=this._trimAlignValue(A);return A},_values:function(B){var G,A,H;if(arguments.length){G=this.options.values[B];G=this._trimAlignValue(G);return G}else{A=this.options.values.slice();for(H=0;H<A.length;H+=1){A[H]=this._trimAlignValue(A[H])}return A}},_trimAlignValue:function(A){if(A<this._valueMin()){return this._valueMin()}if(A>this._valueMax()){return this._valueMax()}var H=this.options.step,B=A%H,G=A-B;if(B>=(H/2)){G+=H}return parseFloat(G.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var B=this.options.range,A=this.options,N=this,Q=(!this._animateOff)?A.animate:false,P,M={},O,T,R,S;if(this.options.values&&this.options.values.length){this.handles.each(function(F,E){P=(N.values(F)-N._valueMin())/(N._valueMax()-N._valueMin())*100;M[N.orientation==="horizontal"?"left":"bottom"]=P+"%";C(this).stop(1,1)[Q?"animate":"css"](M,A.animate);if(N.options.range===true){if(N.orientation==="horizontal"){if(F===0){N.range.stop(1,1)[Q?"animate":"css"]({left:P+"%"},A.animate)}if(F===1){N.range[Q?"animate":"css"]({width:(P-O)+"%"},{queue:false,duration:A.animate})}}else{if(F===0){N.range.stop(1,1)[Q?"animate":"css"]({bottom:(P)+"%"},A.animate)}if(F===1){N.range[Q?"animate":"css"]({height:(P-O)+"%"},{queue:false,duration:A.animate})}}}O=P})}else{T=this.value();R=this._valueMin();S=this._valueMax();P=(S!==R)?(T-R)/(S-R)*100:0;M[N.orientation==="horizontal"?"left":"bottom"]=P+"%";this.handle.stop(1,1)[Q?"animate":"css"](M,A.animate);if(B==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[Q?"animate":"css"]({width:P+"%"},A.animate)}if(B==="max"&&this.orientation==="horizontal"){this.range[Q?"animate":"css"]({width:(100-P)+"%"},{queue:false,duration:A.animate})}if(B==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[Q?"animate":"css"]({height:P+"%"},A.animate)}if(B==="max"&&this.orientation==="vertical"){this.range[Q?"animate":"css"]({height:(100-P)+"%"},{queue:false,duration:A.animate})}}}});C.extend(C.ui.slider,{version:"1.8.1"})}(jQuery));(function(E){var D=0,F=0;E.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'},_create:function(){this._tabify(true)},_setOption:function(A,B){if(A=="selected"){if(this.options.collapsible&&B==this.options.selected){return}this.select(B)}else{this.options[A]=B;this._tabify()}},_tabId:function(A){return A.title&&A.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+(++D)},_sanitizeSelector:function(A){return A.replace(/:/g,"\\:")},_cookie:function(){var A=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+(++F));return E.cookie.apply(null,[A].concat(E.makeArray(arguments)))},_ui:function(B,A){return{tab:B,panel:A,index:this.anchors.index(B)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var A=E(this);A.html(A.data("label.tabs")).removeData("label.tabs")})},_tabify:function(B){this.list=this.element.find("ol,ul").eq(0);this.lis=E("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return E("a",this)[0]});this.panels=E([]);var R=this,S=this.options;var W=/^#.+/;this.anchors.each(function(G,J){var I=E(J).attr("href");var M=I.split("#")[0],K;if(M&&(M===location.toString().split("#")[0]||(K=E("base")[0])&&M===K.href)){I=J.hash;J.href=I}if(W.test(I)){R.panels=R.panels.add(R._sanitizeSelector(I))}else{if(I!="#"){E.data(J,"href.tabs",I);E.data(J,"load.tabs",I.replace(/#.*$/,""));var L=R._tabId(J);J.href="#"+L;var H=E("#"+L);if(!H.length){H=E(S.panelTemplate).attr("id",L).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(R.panels[G-1]||R.list);H.data("destroy.tabs",true)}R.panels=R.panels.add(H)}else{S.disabled.push(G)}}});if(B){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(S.selected===undefined){if(location.hash){this.anchors.each(function(H,G){if(G.hash==location.hash){S.selected=H;return false}})}if(typeof S.selected!="number"&&S.cookie){S.selected=parseInt(R._cookie(),10)}if(typeof S.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){S.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}S.selected=S.selected||(this.lis.length?0:-1)}else{if(S.selected===null){S.selected=-1}}S.selected=((S.selected>=0&&this.anchors[S.selected])||S.selected<0)?S.selected:0;S.disabled=E.unique(S.disabled.concat(E.map(this.lis.filter(".ui-state-disabled"),function(G,H){return R.lis.index(G)}))).sort();if(E.inArray(S.selected,S.disabled)!=-1){S.disabled.splice(E.inArray(S.selected,S.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(S.selected>=0&&this.anchors.length){this.panels.eq(S.selected).removeClass("ui-tabs-hide");this.lis.eq(S.selected).addClass("ui-tabs-selected ui-state-active");R.element.queue("tabs",function(){R._trigger("show",null,R._ui(R.anchors[S.selected],R.panels[S.selected]))});this.load(S.selected)}E(window).bind("unload",function(){R.lis.add(R.anchors).unbind(".tabs");R.lis=R.anchors=R.panels=null})}else{S.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[S.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(S.cookie){this._cookie(S.selected,S.cookie)}for(var Z=0,C;(C=this.lis[Z]);Z++){E(C)[E.inArray(Z,S.disabled)!=-1&&!E(C).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(S.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(S.event!="mouseover"){var Q=function(G,H){if(H.is(":not(.ui-state-disabled)")){H.addClass("ui-state-"+G)}};var Y=function(G,H){H.removeClass("ui-state-"+G)};this.lis.bind("mouseover.tabs",function(){Q("hover",E(this))});this.lis.bind("mouseout.tabs",function(){Y("hover",E(this))});this.anchors.bind("focus.tabs",function(){Q("focus",E(this).closest("li"))});this.anchors.bind("blur.tabs",function(){Y("focus",E(this).closest("li"))})}var U,V;if(S.fx){if(E.isArray(S.fx)){U=S.fx[0];V=S.fx[1]}else{U=V=S.fx}}function T(G,H){G.css({display:""});if(!E.support.opacity&&H.opacity){G[0].style.removeAttribute("filter")}}var A=V?function(G,H){E(G).closest("li").addClass("ui-tabs-selected ui-state-active");H.hide().removeClass("ui-tabs-hide").animate(V,V.duration||"normal",function(){T(H,V);R._trigger("show",null,R._ui(G,H[0]))})}:function(G,H){E(G).closest("li").addClass("ui-tabs-selected ui-state-active");H.removeClass("ui-tabs-hide");R._trigger("show",null,R._ui(G,H[0]))};var X=U?function(G,H){H.animate(U,U.duration||"normal",function(){R.lis.removeClass("ui-tabs-selected ui-state-active");H.addClass("ui-tabs-hide");T(H,U);R.element.dequeue("tabs")})}:function(H,G,I){R.lis.removeClass("ui-tabs-selected ui-state-active");G.addClass("ui-tabs-hide");R.element.dequeue("tabs")};this.anchors.bind(S.event+".tabs",function(){var I=this,J=E(this).closest("li"),H=R.panels.filter(":not(.ui-tabs-hide)"),G=E(R._sanitizeSelector(this.hash));if((J.hasClass("ui-tabs-selected")&&!S.collapsible)||J.hasClass("ui-state-disabled")||J.hasClass("ui-state-processing")||R._trigger("select",null,R._ui(this,G[0]))===false){this.blur();return false}S.selected=R.anchors.index(this);R.abort();if(S.collapsible){if(J.hasClass("ui-tabs-selected")){S.selected=-1;if(S.cookie){R._cookie(S.selected,S.cookie)}R.element.queue("tabs",function(){X(I,H)}).dequeue("tabs");this.blur();return false}else{if(!H.length){if(S.cookie){R._cookie(S.selected,S.cookie)}R.element.queue("tabs",function(){A(I,G)});R.load(R.anchors.index(this));this.blur();return false}}}if(S.cookie){R._cookie(S.selected,S.cookie)}if(G.length){if(H.length){R.element.queue("tabs",function(){X(I,H)})}R.element.queue("tabs",function(){A(I,G)});R.load(R.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(E.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var A=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var C=E.data(this,"href.tabs");if(C){this.href=C}var B=E(this).unbind(".tabs");E.each(["href","load","cache"],function(J,I){B.removeData(I+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(E.data(this,"destroy.tabs")){E(this).remove()}else{E(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(A.cookie){this._cookie(null,A.cookie)}return this},add:function(A,L,N){if(N===undefined){N=this.anchors.length}var P=this,B=this.options,M=E(B.tabTemplate.replace(/#\{href\}/g,A).replace(/#\{label\}/g,L)),C=!A.indexOf("#")?A.replace("#",""):this._tabId(E("a",M)[0]);M.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var O=E("#"+C);if(!O.length){O=E(B.panelTemplate).attr("id",C).data("destroy.tabs",true)}O.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(N>=this.lis.length){M.appendTo(this.list);O.appendTo(this.list[0].parentNode)}else{M.insertBefore(this.lis[N]);O.insertBefore(this.panels[N])}B.disabled=E.map(B.disabled,function(H,G){return H>=N?++H:H});this._tabify();if(this.anchors.length==1){B.selected=0;M.addClass("ui-tabs-selected ui-state-active");O.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){P._trigger("show",null,P._ui(P.anchors[0],P.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[N],this.panels[N]));return this},remove:function(A){var H=this.options,B=this.lis.eq(A).remove(),C=this.panels.eq(A).remove();if(B.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(A+(A+1<this.anchors.length?1:-1))}H.disabled=E.map(E.grep(H.disabled,function(J,G){return J!=A}),function(J,G){return J>=A?--J:J});this._tabify();this._trigger("remove",null,this._ui(B.find("a")[0],C[0]));return this},enable:function(B){var A=this.options;if(E.inArray(B,A.disabled)==-1){return}this.lis.eq(B).removeClass("ui-state-disabled");A.disabled=E.grep(A.disabled,function(H,C){return H!=B});this._trigger("enable",null,this._ui(this.anchors[B],this.panels[B]));return this},disable:function(A){var B=this,C=this.options;if(A!=C.selected){this.lis.eq(A).addClass("ui-state-disabled");C.disabled.push(A);C.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[A],this.panels[A]))}return this},select:function(A){if(typeof A=="string"){A=this.anchors.index(this.anchors.filter("[href$="+A+"]"))}else{if(A===null){A=-1}}if(A==-1&&this.options.collapsible){A=this.options.selected}this.anchors.eq(A).trigger(this.options.event+".tabs");return this},load:function(B){var J=this,A=this.options,C=this.anchors.eq(B)[0],K=E.data(C,"load.tabs");this.abort();if(!K||this.element.queue("tabs").length!==0&&E.data(C,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(B).addClass("ui-state-processing");if(A.spinner){var L=E("span",C);L.data("label.tabs",L.html()).html(A.spinner)}this.xhr=E.ajax(E.extend({},A.ajaxOptions,{url:K,success:function(I,G){E(J._sanitizeSelector(C.hash)).html(I);J._cleanup();if(A.cache){E.data(C,"cache.tabs",true)}J._trigger("load",null,J._ui(J.anchors[B],J.panels[B]));try{A.ajaxOptions.success(I,G)}catch(H){}},error:function(H,I,G){J._cleanup();J._trigger("load",null,J._ui(J.anchors[B],J.panels[B]));try{A.ajaxOptions.error(H,I,B,C)}catch(G){}}}));J.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(B,A){this.anchors.eq(B).removeData("cache.tabs").data("load.tabs",A);return this},length:function(){return this.anchors.length}});E.extend(E.ui.tabs,{version:"1.8.1"});E.extend(E.ui.tabs.prototype,{rotation:null,rotate:function(A,C){var B=this,J=this.options;var K=B._rotate||(B._rotate=function(G){clearTimeout(B.rotation);B.rotation=setTimeout(function(){var H=J.selected;B.select(++H<B.anchors.length?H:0)},A);if(G){G.stopPropagation()}});var L=B._unrotate||(B._unrotate=!C?function(G){if(G.clientX){B.rotate(null)}}:function(G){t=J.selected;K()});if(A){this.element.bind("tabsshow",K);this.anchors.bind(J.event+".tabs",L);K()}else{clearTimeout(B.rotation);this.element.unbind("tabsshow",K);this.anchors.unbind(J.event+".tabs",L);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function($){$.extend($.ui,{datepicker:{version:"1.8.1"}});var PROP_NAME="datepicker";var dpuuid=new Date().getTime();function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"_default",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst)},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()}if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}input.unbind("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0]){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor==Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=document.documentElement.clientWidth;var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker()}var date=this._getDateDatepicker(target,true);extendRemove(inst.settings,settings);this._attachments($(target),inst);this._autoSize(inst);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass,inst.dpDiv).add($("td."+$.datepicker._currentClass,inst.dpDiv));if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker()}return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target);if(inst.input.val()!=inst.lastVal){try{var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(event){$.datepicker.log(event)}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!=inst){$.datepicker._curInst.dpDiv.stop(true,true)}var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})};inst.dpDiv.zIndex($(input).zIndex()+1);if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim||"show"]((showAnim?duration:null),postProcess)}if(!showAnim||!duration){postProcess()}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var self=this;var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst==$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+$(document).scrollLeft();var viewHeight=document.documentElement.clientHeight+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var inst=this._getInst(obj);var isRTL=this._get(inst,"isRTL");while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj[isRTL?"previousSibling":"nextSibling"]}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst);this._curInst=null};if($.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input.focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);var dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var size=(match=="@"?14:(match=="!"?20:(match=="y"?4:(match=="o"?3:2))));var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue}iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);for(var i=0;i<names.length;i++){if(value.substr(iValue,names[i].length)==names[i]){iValue+=names[i].length;return i+1}}throw"Unknown name at position "+iValue};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":var date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",(date.getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()==inst.lastVal){return}var dateFormat=this._get(inst,"dateFormat");var dates=inst.lastVal=inst.input?inst.input.val():null;var date,defaultDate;date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);dates=(noDefault?"":dates)}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if((origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var showWeek=this._get(inst,"showWeek");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead=(showWeek?'<th class="ui-datepicker-week-col">'+this._get(inst,"weekHeader")+"</th>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody=(!showWeek?"":'<td class="ui-datepicker-week-col">'+this._get(inst,"calculateWeek")(printDate)+"</td>");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+inst.id+"',"+printDate.getMonth()+","+printDate.getFullYear()+', this);return false;"')+">"+(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+'" href="javascript:void(0);">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span>"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'M');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var thisYear=new Date().getFullYear();var determineYear=function(value){var year=(value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};var year=determineYear(years[0]);var endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8.1";window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(B){B.widget("ui.progressbar",{options:{value:0},_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=B("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();B.Widget.prototype.destroy.apply(this,arguments)},value:function(A){if(A===undefined){return this._value()}this._setOption("value",A);return this},_setOption:function(A,D){switch(A){case"value":this.options.value=D;this._refreshValue();this._trigger("change");break}B.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var A=this.options.value;if(typeof A!=="number"){A=0}if(A<this._valueMin()){A=this._valueMin()}if(A>this._valueMax()){A=this._valueMax()}return A},_valueMin:function(){return 0},_valueMax:function(){return 100},_refreshValue:function(){var A=this.value();this.valueDiv[A===this._valueMax()?"addClass":"removeClass"]("ui-corner-right").width(A+"%");this.element.attr("aria-valuenow",A)}});B.extend(B.ui.progressbar,{version:"1.8.1"})})(jQuery);jQuery.effects||(function(L){L.effects={};L.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(A,B){L.fx.step[B]=function(C){if(!C.colorInit){C.start=N(C.elem,B);C.end=O(C.end);C.colorInit=true}C.elem.style[B]="rgb("+Math.max(Math.min(parseInt((C.pos*(C.end[0]-C.start[0]))+C.start[0],10),255),0)+","+Math.max(Math.min(parseInt((C.pos*(C.end[1]-C.start[1]))+C.start[1],10),255),0)+","+Math.max(Math.min(parseInt((C.pos*(C.end[2]-C.start[2]))+C.start[2],10),255),0)+")"}});function O(B){var A;if(B&&B.constructor==Array&&B.length==3){return B}if(A=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(B)){return[parseInt(A[1],10),parseInt(A[2],10),parseInt(A[3],10)]}if(A=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(B)){return[parseFloat(A[1])*2.55,parseFloat(A[2])*2.55,parseFloat(A[3])*2.55]}if(A=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(B)){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]}if(A=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(B)){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]}if(A=/rgba\(0, 0, 0, 0\)/.exec(B)){return K["transparent"]}return K[L.trim(B).toLowerCase()]}function N(A,C){var B;do{B=L.curCSS(A,C);if(B!=""&&B!="transparent"||L.nodeName(A,"body")){break}C="backgroundColor"}while(A=A.parentNode);return O(B)}var K={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};var R=["add","remove","toggle"],P={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function Q(){var D=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,C={},A,B;if(D&&D.length&&D[0]&&D[D[0]]){var E=D.length;while(E--){A=D[E];if(typeof D[A]=="string"){B=A.replace(/\-(\w)/g,function(F,G){return G.toUpperCase()});C[B]=D[A]}}}else{for(A in D){if(typeof D[A]==="string"){C[A]=D[A]}}}return C}function T(B){var A,C;for(A in B){C=B[A];if(C==null||L.isFunction(C)||A in P||(/scrollbar/).test(A)||(!(/color/i).test(A)&&isNaN(parseFloat(C)))){delete B[A]}}return B}function S(A,D){var B={_:0},C;for(C in D){if(A[C]!=D[C]){B[C]=D[C]}}return B}L.effects.animateClass=function(B,D,C,A){if(L.isFunction(C)){A=C;C=null}return this.each(function(){var H=L(this),I=H.attr("style")||" ",F=T(Q.call(this)),G,E=H.attr("className");L.each(R,function(V,J){if(B[J]){H[J+"Class"](B[J])}});G=T(Q.call(this));H.attr("className",E);H.animate(S(F,G),D,C,function(){L.each(R,function(V,J){if(B[J]){H[J+"Class"](B[J])}});if(typeof H.attr("style")=="object"){H.attr("style").cssText="";H.attr("style").cssText=I}else{H.attr("style",I)}if(A){A.apply(this,arguments)}})})};L.fn.extend({_addClass:L.fn.addClass,addClass:function(B,C,D,A){return C?L.effects.animateClass.apply(this,[{add:B},C,D,A]):this._addClass(B)},_removeClass:L.fn.removeClass,removeClass:function(B,C,D,A){return C?L.effects.animateClass.apply(this,[{remove:B},C,D,A]):this._removeClass(B)},_toggleClass:L.fn.toggleClass,toggleClass:function(B,C,D,E,A){if(typeof C=="boolean"||C===undefined){if(!D){return this._toggleClass(B,C)}else{return L.effects.animateClass.apply(this,[(C?{add:B}:{remove:B}),D,E,A])}}else{return L.effects.animateClass.apply(this,[{toggle:B},C,D,E])}},switchClass:function(A,C,D,E,B){return L.effects.animateClass.apply(this,[{add:C,remove:A},D,E,B])}});L.extend(L.effects,{version:"1.8.1",save:function(B,C){for(var A=0;A<C.length;A++){if(C[A]!==null){B.data("ec.storage."+C[A],B[0].style[C[A]])}}},restore:function(B,C){for(var A=0;A<C.length;A++){if(C[A]!==null){B.css(C[A],B.data("ec.storage."+C[A]))}}},setMode:function(A,B){if(B=="toggle"){B=A.is(":hidden")?"show":"hide"}return B},getBaseline:function(B,A){var D,C;switch(B[0]){case"top":D=0;break;case"middle":D=0.5;break;case"bottom":D=1;break;default:D=B[0]/A.height}switch(B[1]){case"left":C=0;break;case"center":C=0.5;break;case"right":C=1;break;default:C=B[1]/A.width}return{x:C,y:D}},createWrapper:function(C){if(C.parent().is(".ui-effects-wrapper")){return C.parent()}var B={width:C.outerWidth(true),height:C.outerHeight(true),"float":C.css("float")},A=L("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});C.wrap(A);A=C.parent();if(C.css("position")=="static"){A.css({position:"relative"});C.css({position:"relative"})}else{L.extend(B,{position:C.css("position"),zIndex:C.css("z-index")});L.each(["top","left","bottom","right"],function(D,E){B[E]=C.css(E);if(isNaN(parseInt(B[E],10))){B[E]="auto"}});C.css({position:"relative",top:0,left:0})}return A.css(B).show()},removeWrapper:function(A){if(A.parent().is(".ui-effects-wrapper")){return A.parent().replaceWith(A)}return A},setTransition:function(B,C,A,D){D=D||{};L.each(C,function(F,E){unit=B.cssUnit(E);if(unit[0]>0){D[E]=unit[0]*A+unit[1]}});return D}});function M(A,D,C,B){if(typeof A=="object"){B=D;C=null;D=A;A=D.effect}if(L.isFunction(D)){B=D;C=null;D={}}if(L.isFunction(C)){B=C;C=null}if(typeof D=="number"||L.fx.speeds[D]){B=C;C=D;D={}}D=D||{};C=C||D.duration;C=L.fx.off?0:typeof C=="number"?C:L.fx.speeds[C]||L.fx.speeds._default;B=B||D.complete;return[A,D,C,B]}L.fn.extend({effect:function(A,E,F,D){var C=M.apply(this,arguments),B={options:C[1],duration:C[2],callback:C[3]},G=L.effects[A];return G&&!L.fx.off?G.call(this,B):this},_show:L.fn.show,show:function(A){if(!A||typeof A=="number"||L.fx.speeds[A]){return this._show.apply(this,arguments)}else{var B=M.apply(this,arguments);B[1].mode="show";return this.effect.apply(this,B)}},_hide:L.fn.hide,hide:function(A){if(!A||typeof A=="number"||L.fx.speeds[A]){return this._hide.apply(this,arguments)}else{var B=M.apply(this,arguments);B[1].mode="hide";return this.effect.apply(this,B)}},__toggle:L.fn.toggle,toggle:function(A){if(!A||typeof A=="number"||L.fx.speeds[A]||typeof A=="boolean"||L.isFunction(A)){return this.__toggle.apply(this,arguments)}else{var B=M.apply(this,arguments);B[1].mode="toggle";return this.effect.apply(this,B)}},cssUnit:function(A){var B=this.css(A),C=[];L.each(["em","px","%","pt"],function(D,E){if(B.indexOf(E)>0){C=[parseFloat(B),E]}});return C}});L.easing.jswing=L.easing.swing;L.extend(L.easing,{def:"easeOutQuad",swing:function(D,E,B,C,A){return L.easing[L.easing.def](D,E,B,C,A)},easeInQuad:function(D,E,B,C,A){return C*(E/=A)*E+B},easeOutQuad:function(D,E,B,C,A){return -C*(E/=A)*(E-2)+B},easeInOutQuad:function(D,E,B,C,A){if((E/=A/2)<1){return C/2*E*E+B}return -C/2*((--E)*(E-2)-1)+B},easeInCubic:function(D,E,B,C,A){return C*(E/=A)*E*E+B},easeOutCubic:function(D,E,B,C,A){return C*((E=E/A-1)*E*E+1)+B},easeInOutCubic:function(D,E,B,C,A){if((E/=A/2)<1){return C/2*E*E*E+B}return C/2*((E-=2)*E*E+2)+B},easeInQuart:function(D,E,B,C,A){return C*(E/=A)*E*E*E+B},easeOutQuart:function(D,E,B,C,A){return -C*((E=E/A-1)*E*E*E-1)+B},easeInOutQuart:function(D,E,B,C,A){if((E/=A/2)<1){return C/2*E*E*E*E+B}return -C/2*((E-=2)*E*E*E-2)+B},easeInQuint:function(D,E,B,C,A){return C*(E/=A)*E*E*E*E+B},easeOutQuint:function(D,E,B,C,A){return C*((E=E/A-1)*E*E*E*E+1)+B},easeInOutQuint:function(D,E,B,C,A){if((E/=A/2)<1){return C/2*E*E*E*E*E+B}return C/2*((E-=2)*E*E*E*E+2)+B},easeInSine:function(D,E,B,C,A){return -C*Math.cos(E/A*(Math.PI/2))+C+B},easeOutSine:function(D,E,B,C,A){return C*Math.sin(E/A*(Math.PI/2))+B},easeInOutSine:function(D,E,B,C,A){return -C/2*(Math.cos(Math.PI*E/A)-1)+B},easeInExpo:function(D,E,B,C,A){return(E==0)?B:C*Math.pow(2,10*(E/A-1))+B},easeOutExpo:function(D,E,B,C,A){return(E==A)?B+C:C*(-Math.pow(2,-10*E/A)+1)+B},easeInOutExpo:function(D,E,B,C,A){if(E==0){return B}if(E==A){return B+C}if((E/=A/2)<1){return C/2*Math.pow(2,10*(E-1))+B}return C/2*(-Math.pow(2,-10*--E)+2)+B},easeInCirc:function(D,E,B,C,A){return -C*(Math.sqrt(1-(E/=A)*E)-1)+B},easeOutCirc:function(D,E,B,C,A){return C*Math.sqrt(1-(E=E/A-1)*E)+B},easeInOutCirc:function(D,E,B,C,A){if((E/=A/2)<1){return -C/2*(Math.sqrt(1-E*E)-1)+B}return C/2*(Math.sqrt(1-(E-=2)*E)+1)+B},easeInElastic:function(H,E,B,C,F){var A=1.70158;var D=0;var G=C;if(E==0){return B}if((E/=F)==1){return B+C}if(!D){D=F*0.3}if(G<Math.abs(C)){G=C;var A=D/4}else{var A=D/(2*Math.PI)*Math.asin(C/G)}return -(G*Math.pow(2,10*(E-=1))*Math.sin((E*F-A)*(2*Math.PI)/D))+B},easeOutElastic:function(H,E,B,C,F){var A=1.70158;var D=0;var G=C;if(E==0){return B}if((E/=F)==1){return B+C}if(!D){D=F*0.3}if(G<Math.abs(C)){G=C;var A=D/4}else{var A=D/(2*Math.PI)*Math.asin(C/G)}return G*Math.pow(2,-10*E)*Math.sin((E*F-A)*(2*Math.PI)/D)+C+B},easeInOutElastic:function(H,E,B,C,F){var A=1.70158;var D=0;var G=C;if(E==0){return B}if((E/=F/2)==2){return B+C}if(!D){D=F*(0.3*1.5)}if(G<Math.abs(C)){G=C;var A=D/4}else{var A=D/(2*Math.PI)*Math.asin(C/G)}if(E<1){return -0.5*(G*Math.pow(2,10*(E-=1))*Math.sin((E*F-A)*(2*Math.PI)/D))+B}return G*Math.pow(2,-10*(E-=1))*Math.sin((E*F-A)*(2*Math.PI)/D)*0.5+C+B},easeInBack:function(F,C,D,B,A,E){if(E==undefined){E=1.70158}return B*(C/=A)*C*((E+1)*C-E)+D},easeOutBack:function(F,C,D,B,A,E){if(E==undefined){E=1.70158}return B*((C=C/A-1)*C*((E+1)*C+E)+1)+D},easeInOutBack:function(F,C,D,B,A,E){if(E==undefined){E=1.70158}if((C/=A/2)<1){return B/2*(C*C*(((E*=(1.525))+1)*C-E))+D}return B/2*((C-=2)*C*(((E*=(1.525))+1)*C+E)+2)+D},easeInBounce:function(D,E,B,C,A){return C-L.easing.easeOutBounce(D,A-E,0,C,A)+B},easeOutBounce:function(D,E,B,C,A){if((E/=A)<(1/2.75)){return C*(7.5625*E*E)+B}else{if(E<(2/2.75)){return C*(7.5625*(E-=(1.5/2.75))*E+0.75)+B}else{if(E<(2.5/2.75)){return C*(7.5625*(E-=(2.25/2.75))*E+0.9375)+B}else{return C*(7.5625*(E-=(2.625/2.75))*E+0.984375)+B}}}},easeInOutBounce:function(D,E,B,C,A){if(E<A/2){return L.easing.easeInBounce(D,E*2,0,C,A)*0.5+B}return L.easing.easeOutBounce(D,E*2-A,0,C,A)*0.5+C*0.5+B}})})(jQuery);(function(B){B.effects.blind=function(A){return this.queue(function(){var N=B(this),Q=["position","top","left"];var K=B.effects.setMode(N,A.options.mode||"hide");var M=A.options.direction||"vertical";B.effects.save(N,Q);N.show();var L=B.effects.createWrapper(N).css({overflow:"hidden"});var P=(M=="vertical")?"height":"width";var O=(M=="vertical")?L.height():L.width();if(K=="show"){L.css(P,0)}var R={};R[P]=K=="show"?O:0;L.animate(R,A.duration,A.options.easing,function(){if(K=="hide"){N.hide()}B.effects.restore(N,Q);B.effects.removeWrapper(N);if(A.callback){A.callback.apply(N[0],arguments)}N.dequeue()})})}})(jQuery);(function(B){B.effects.bounce=function(A){return this.queue(function(){var Q=B(this),Y=["position","top","left"];var T=B.effects.setMode(Q,A.options.mode||"effect");var W=A.options.direction||"up";var b=A.options.distance||20;var U=A.options.times||5;var X=A.duration||250;if(/show|hide/.test(T)){Y.push("opacity")}B.effects.save(Q,Y);Q.show();B.effects.createWrapper(Q);var a=(W=="up"||W=="down")?"top":"left";var V=(W=="up"||W=="left")?"pos":"neg";var b=A.options.distance||(a=="top"?Q.outerHeight({margin:true})/3:Q.outerWidth({margin:true})/3);if(T=="show"){Q.css("opacity",0).css(a,V=="pos"?-b:b)}if(T=="hide"){b=b/(U*2)}if(T!="hide"){U--}if(T=="show"){var S={opacity:1};S[a]=(V=="pos"?"+=":"-=")+b;Q.animate(S,X/2,A.options.easing);b=b/2;U--}for(var R=0;R<U;R++){var Z={},P={};Z[a]=(V=="pos"?"-=":"+=")+b;P[a]=(V=="pos"?"+=":"-=")+b;Q.animate(Z,X/2,A.options.easing).animate(P,X/2,A.options.easing);b=(T=="hide")?b*2:b/2}if(T=="hide"){var S={opacity:0};S[a]=(V=="pos"?"-=":"+=")+b;Q.animate(S,X/2,A.options.easing,function(){Q.hide();B.effects.restore(Q,Y);B.effects.removeWrapper(Q);if(A.callback){A.callback.apply(this,arguments)}})}else{var Z={},P={};Z[a]=(V=="pos"?"-=":"+=")+b;P[a]=(V=="pos"?"+=":"-=")+b;Q.animate(Z,X/2,A.options.easing).animate(P,X/2,A.options.easing,function(){B.effects.restore(Q,Y);B.effects.removeWrapper(Q);if(A.callback){A.callback.apply(this,arguments)}})}Q.queue("fx",function(){Q.dequeue()});Q.dequeue()})}})(jQuery);(function(B){B.effects.clip=function(A){return this.queue(function(){var P=B(this),S=["position","top","left","height","width"];var M=B.effects.setMode(P,A.options.mode||"hide");var O=A.options.direction||"vertical";B.effects.save(P,S);P.show();var N=B.effects.createWrapper(P).css({overflow:"hidden"});var Q=P[0].tagName=="IMG"?N:P;var R={size:(O=="vertical")?"height":"width",position:(O=="vertical")?"top":"left"};var T=(O=="vertical")?Q.height():Q.width();if(M=="show"){Q.css(R.size,0);Q.css(R.position,T/2)}var L={};L[R.size]=M=="show"?T:0;L[R.position]=M=="show"?0:T/2;Q.animate(L,{queue:false,duration:A.duration,easing:A.options.easing,complete:function(){if(M=="hide"){P.hide()}B.effects.restore(P,S);B.effects.removeWrapper(P);if(A.callback){A.callback.apply(P[0],arguments)}P.dequeue()}})})}})(jQuery);(function(B){B.effects.drop=function(A){return this.queue(function(){var N=B(this),Q=["position","top","left","opacity"];var K=B.effects.setMode(N,A.options.mode||"hide");var M=A.options.direction||"left";B.effects.save(N,Q);N.show();B.effects.createWrapper(N);var P=(M=="up"||M=="down")?"top":"left";var L=(M=="up"||M=="left")?"pos":"neg";var O=A.options.distance||(P=="top"?N.outerHeight({margin:true})/2:N.outerWidth({margin:true})/2);if(K=="show"){N.css("opacity",0).css(P,L=="pos"?-O:O)}var R={opacity:K=="show"?1:0};R[P]=(K=="show"?(L=="pos"?"+=":"-="):(L=="pos"?"-=":"+="))+O;N.animate(R,{queue:false,duration:A.duration,easing:A.options.easing,complete:function(){if(K=="hide"){N.hide()}B.effects.restore(N,Q);B.effects.removeWrapper(N);if(A.callback){A.callback.apply(this,arguments)}N.dequeue()}})})}})(jQuery);(function(B){B.effects.explode=function(A){return this.queue(function(){var M=A.options.pieces?Math.round(Math.sqrt(A.options.pieces)):3;var R=A.options.pieces?Math.round(Math.sqrt(A.options.pieces)):3;A.options.mode=A.options.mode=="toggle"?(B(this).is(":visible")?"hide":"show"):A.options.mode;var O=B(this).show().css("visibility","hidden");var Q=O.offset();Q.top-=parseInt(O.css("marginTop"),10)||0;Q.left-=parseInt(O.css("marginLeft"),10)||0;var L=O.outerWidth(true);var P=O.outerHeight(true);for(var K=0;K<M;K++){for(var N=0;N<R;N++){O.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-N*(L/R),top:-K*(P/M)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:L/R,height:P/M,left:Q.left+N*(L/R)+(A.options.mode=="show"?(N-Math.floor(R/2))*(L/R):0),top:Q.top+K*(P/M)+(A.options.mode=="show"?(K-Math.floor(M/2))*(P/M):0),opacity:A.options.mode=="show"?0:1}).animate({left:Q.left+N*(L/R)+(A.options.mode=="show"?0:(N-Math.floor(R/2))*(L/R)),top:Q.top+K*(P/M)+(A.options.mode=="show"?0:(K-Math.floor(M/2))*(P/M)),opacity:A.options.mode=="show"?1:0},A.duration||500)}}setTimeout(function(){A.options.mode=="show"?O.css({visibility:"visible"}):O.css({visibility:"visible"}).hide();if(A.callback){A.callback.apply(O[0])}O.dequeue();B("div.ui-effects-explode").remove()},A.duration||500)})}})(jQuery);(function(B){B.effects.fold=function(A){return this.queue(function(){var V=B(this),X=["position","top","left"];var U=B.effects.setMode(V,A.options.mode||"hide");var Y=A.options.size||15;var T=!(!A.options.horizFirst);var W=A.duration?A.duration/2:B.fx.speeds._default/2;B.effects.save(V,X);V.show();var S=B.effects.createWrapper(V).css({overflow:"hidden"});var b=((U=="show")!=T);var a=b?["width","height"]:["height","width"];var R=b?[S.width(),S.height()]:[S.height(),S.width()];var Z=/([0-9]+)%/.exec(Y);if(Z){Y=parseInt(Z[1],10)/100*R[U=="hide"?0:1]}if(U=="show"){S.css(T?{height:0,width:Y}:{height:Y,width:0})}var Q={},P={};Q[a[0]]=U=="show"?R[0]:Y;P[a[1]]=U=="show"?R[1]:0;S.animate(Q,W,A.options.easing).animate(P,W,A.options.easing,function(){if(U=="hide"){V.hide()}B.effects.restore(V,X);B.effects.removeWrapper(V);if(A.callback){A.callback.apply(V[0],arguments)}V.dequeue()})})}})(jQuery);(function(B){B.effects.highlight=function(A){return this.queue(function(){var I=B(this),G=["backgroundImage","backgroundColor","opacity"],H=B.effects.setMode(I,A.options.mode||"show"),J={backgroundColor:I.css("backgroundColor")};if(H=="hide"){J.opacity=0}B.effects.save(I,G);I.show().css({backgroundImage:"none",backgroundColor:A.options.color||"#ffff99"}).animate(J,{queue:false,duration:A.duration,easing:A.options.easing,complete:function(){(H=="hide"&&I.hide());B.effects.restore(I,G);(H=="show"&&!B.support.opacity&&this.style.removeAttribute("filter"));(A.callback&&A.callback.apply(this,arguments));I.dequeue()}})})}})(jQuery);(function(B){B.effects.pulsate=function(A){return this.queue(function(){var G=B(this),F=B.effects.setMode(G,A.options.mode||"show");times=((A.options.times||5)*2)-1;duration=A.duration?A.duration/2:B.fx.speeds._default/2,isVisible=G.is(":visible"),animateTo=0;if(!isVisible){G.css("opacity",0).show();animateTo=1}if((F=="hide"&&isVisible)||(F=="show"&&!isVisible)){times--}for(var H=0;H<times;H++){G.animate({opacity:animateTo},duration,A.options.easing);animateTo=(animateTo+1)%2}G.animate({opacity:animateTo},duration,A.options.easing,function(){if(animateTo==0){G.hide()}(A.callback&&A.callback.apply(this,arguments))});G.queue("fx",function(){G.dequeue()}).dequeue()})}})(jQuery);(function(B){B.effects.puff=function(A){return this.queue(function(){var H=B(this),J=B.effects.setMode(H,A.options.mode||"hide"),L=parseInt(A.options.percent,10)||150,K=L/100,I={height:H.height(),width:H.width()};B.extend(A.options,{fade:true,mode:J,percent:J=="hide"?L:100,from:J=="hide"?I:{height:I.height*K,width:I.width*K}});H.effect("scale",A.options,A.duration,A.callback);H.dequeue()})};B.effects.scale=function(A){return this.queue(function(){var R=B(this);var K=B.extend(true,{},A.options);var L=B.effects.setMode(R,A.options.mode||"effect");var N=parseInt(A.options.percent,10)||(parseInt(A.options.percent,10)==0?0:(L=="hide"?0:100));var P=A.options.direction||"both";var O=A.options.origin;if(L!="effect"){K.origin=O||["middle","center"];K.restore=true}var M={height:R.height(),width:R.width()};R.from=A.options.from||(L=="show"?{height:0,width:0}:M);var Q={y:P!="horizontal"?(N/100):1,x:P!="vertical"?(N/100):1};R.to={height:M.height*Q.y,width:M.width*Q.x};if(A.options.fade){if(L=="show"){R.from.opacity=0;R.to.opacity=1}if(L=="hide"){R.from.opacity=1;R.to.opacity=0}}K.from=R.from;K.to=R.to;K.mode=L;R.effect("size",K,A.duration,A.callback);R.dequeue()})};B.effects.size=function(A){return this.queue(function(){var a=B(this),d=["position","top","left","width","height","overflow","opacity"];var V=["position","top","left","overflow","opacity"];var T=["width","height","overflow"];var Q=["fontSize"];var Z=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var U=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var c=B.effects.setMode(a,A.options.mode||"effect");var S=A.options.restore||false;var Y=A.options.scale||"both";var W=A.options.origin;var X={height:a.height(),width:a.width()};a.from=A.options.from||X;a.to=A.options.to||X;if(W){var R=B.effects.getBaseline(W,X);a.from.top=(X.height-a.from.height)*R.y;a.from.left=(X.width-a.from.width)*R.x;a.to.top=(X.height-a.to.height)*R.y;a.to.left=(X.width-a.to.width)*R.x}var b={from:{y:a.from.height/X.height,x:a.from.width/X.width},to:{y:a.to.height/X.height,x:a.to.width/X.width}};if(Y=="box"||Y=="both"){if(b.from.y!=b.to.y){d=d.concat(Z);a.from=B.effects.setTransition(a,Z,b.from.y,a.from);a.to=B.effects.setTransition(a,Z,b.to.y,a.to)}if(b.from.x!=b.to.x){d=d.concat(U);a.from=B.effects.setTransition(a,U,b.from.x,a.from);a.to=B.effects.setTransition(a,U,b.to.x,a.to)}}if(Y=="content"||Y=="both"){if(b.from.y!=b.to.y){d=d.concat(Q);a.from=B.effects.setTransition(a,Q,b.from.y,a.from);a.to=B.effects.setTransition(a,Q,b.to.y,a.to)}}B.effects.save(a,S?d:V);a.show();B.effects.createWrapper(a);a.css("overflow","hidden").css(a.from);if(Y=="content"||Y=="both"){Z=Z.concat(["marginTop","marginBottom"]).concat(Q);U=U.concat(["marginLeft","marginRight"]);T=d.concat(Z).concat(U);a.find("*[width]").each(function(){child=B(this);if(S){B.effects.save(child,T)}var C={height:child.height(),width:child.width()};child.from={height:C.height*b.from.y,width:C.width*b.from.x};child.to={height:C.height*b.to.y,width:C.width*b.to.x};if(b.from.y!=b.to.y){child.from=B.effects.setTransition(child,Z,b.from.y,child.from);child.to=B.effects.setTransition(child,Z,b.to.y,child.to)}if(b.from.x!=b.to.x){child.from=B.effects.setTransition(child,U,b.from.x,child.from);child.to=B.effects.setTransition(child,U,b.to.x,child.to)}child.css(child.from);child.animate(child.to,A.duration,A.options.easing,function(){if(S){B.effects.restore(child,T)}})})}a.animate(a.to,{queue:false,duration:A.duration,easing:A.options.easing,complete:function(){if(a.to.opacity===0){a.css("opacity",a.from.opacity)}if(c=="hide"){a.hide()}B.effects.restore(a,S?d:V);B.effects.removeWrapper(a);if(A.callback){A.callback.apply(this,arguments)}a.dequeue()}})})}})(jQuery);(function(B){B.effects.shake=function(A){return this.queue(function(){var Y=B(this),X=["position","top","left"];var T=B.effects.setMode(Y,A.options.mode||"effect");var W=A.options.direction||"left";var R=A.options.distance||20;var P=A.options.times||3;var a=A.duration||A.options.duration||140;B.effects.save(Y,X);Y.show();B.effects.createWrapper(Y);var Z=(W=="up"||W=="down")?"top":"left";var V=(W=="up"||W=="left")?"pos":"neg";var S={},Q={},b={};S[Z]=(V=="pos"?"-=":"+=")+R;Q[Z]=(V=="pos"?"+=":"-=")+R*2;b[Z]=(V=="pos"?"-=":"+=")+R*2;Y.animate(S,a,A.options.easing);for(var U=1;U<P;U++){Y.animate(Q,a,A.options.easing).animate(b,a,A.options.easing)}Y.animate(Q,a,A.options.easing).animate(S,a/2,A.options.easing,function(){B.effects.restore(Y,X);B.effects.removeWrapper(Y);if(A.callback){A.callback.apply(this,arguments)}});Y.queue("fx",function(){Y.dequeue()});Y.dequeue()})}})(jQuery);(function(B){B.effects.slide=function(A){return this.queue(function(){var N=B(this),Q=["position","top","left"];var K=B.effects.setMode(N,A.options.mode||"show");var M=A.options.direction||"left";B.effects.save(N,Q);N.show();B.effects.createWrapper(N).css({overflow:"hidden"});var P=(M=="up"||M=="down")?"top":"left";var L=(M=="up"||M=="left")?"pos":"neg";var O=A.options.distance||(P=="top"?N.outerHeight({margin:true}):N.outerWidth({margin:true}));if(K=="show"){N.css(P,L=="pos"?-O:O)}var R={};R[P]=(K=="show"?(L=="pos"?"+=":"-="):(L=="pos"?"-=":"+="))+O;N.animate(R,{queue:false,duration:A.duration,easing:A.options.easing,complete:function(){if(K=="hide"){N.hide()}B.effects.restore(N,Q);B.effects.removeWrapper(N);if(A.callback){A.callback.apply(this,arguments)}N.dequeue()}})})}})(jQuery);(function(B){B.effects.transfer=function(A){return this.queue(function(){var L=B(this),J=B(A.options.to),I=J.offset(),N={top:I.top,left:I.left,height:J.innerHeight(),width:J.innerWidth()},K=L.offset(),M=B('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(A.options.className).css({top:K.top,left:K.left,height:L.innerHeight(),width:L.innerWidth(),position:"absolute"}).animate(N,A.duration,A.options.easing,function(){M.remove();(A.callback&&A.callback.apply(L[0],arguments));L.dequeue()})})}})(jQuery);